Opening Databases

Once you’ve created a database, it’s easy to open it later. The standard approach is to choose File→Open, and then to browse for your database file, select it, and click Open.

You can also open a database file from outside Access. For example, you can browse to the folder that holds your database file using Windows Explorer and double-click it. Or, just save the file on your desktop so it’s easy to find when you need it.

Designating a Database as Trusted

When you open a database for the first time, you’ll notice something a little bizarre. Access pops up a message bar with a scary-sounding security warning (Figure 1-14).

If you’re opening your own recently created database, this security warning is a bit confusing, because right now your database doesn’t even attempt to do anything risky. However, once you start building databases with code routines (as described in Part Five), or when you start using action queries (Chapter 8), it’s a different story. In those situations, you need to know if Access trusts your database and will allow it to run code and action queries.

In the meantime, you’re probably wondering what you should do about the message bar. You have two options:

  • Click the X at the right side of the message bar to banish it. (But it’ll reappear the next time you open the database.)

    This security warning tells you that Access doesn’t trust your database—in other words, it’s opened your file in a special safe mode that prevents your database from performing any risky operations.

    Figure 1-14. This security warning tells you that Access doesn’t trust your database—in other words, it’s opened your file in a special safe mode that prevents your database from performing any risky operations.

  • Click Enable Content to tell Access that it can trust this database. Access won’t bother you again about this file.

In previous versions of Access, the security warning would appear every time you opened a database, unless you took additional steps to configure Access’s security settings. Access 2010 tries to be less annoying. If you click Enable Content, Access remembers that you trust this database, and it won’t ask you again, unless you rename the database file or move it to a new folder. This arrangement is called trusted documents, and it’s described in more detail on Trusted Databases.

Opening Recent Databases

You can find the most recently opened databases in Access’s Recent Databases list. To see this list, just choose File→Recent (Figure 1-15).

Ordinarily, Access tracks the previous 17 databases in the File→Recent list, but you can tell it to keep a shorter or longer list. To change this setting, choose File→Options, choose Client Settings, scroll down to the Display section, and change the number for “Show this number of Recent Documents”. You can pick any number from 0 to 50.

The Recent Databases list isn’t the only way to return to a database that you’ve worked on recently. Access places the four most recently opened database files in an even more accessible place: the column of commands in backstage view. For example, if you’ve recently worked on Bobbleheads.accdb, you can open it in a jiffy by choosing File→Bobbleheads.accdb, as highlighted in Figure 1-15.

The Recent Databases’s biggest advantage is the way it lets you keep important files at your fingertips using pinning. To try it, click the thumbtack next to the database file you want to keep. Access moves your database to the top of the list and keeps it there. From this point on, that database won’t leave the list, no matter how many databases you open. If you decide to stop working with the database later on, just click the thumbtack again to release it.

Figure 1-15. The Recent Databases’s biggest advantage is the way it lets you keep important files at your fingertips using pinning. To try it, click the thumbtack next to the database file you want to keep. Access moves your database to the top of the list and keeps it there. From this point on, that database won’t leave the list, no matter how many databases you open. If you decide to stop working with the database later on, just click the thumbtack again to release it.

If you want Access to place more (or fewer) recent databases in this superconvenient spot, choose File→Recent, and modify the number for the “Quickly access this number of Recent Databases” setting at the bottom of the window. You can also clear the checkbox next to this setting to stop adding recent databases to the command list altogether, which is useful if you find they’re just getting in the way.

Tip

Do you want to hide your recent work? You can remove any file from the Recent Databases list by right-clicking it and choosing “Remove from list”. And if the clutter is keeping you from finding the databases you want, just pin the important files, then right-click any file, and choose “Clear unpinned items”. This action removes every file that isn’t pinned down.

Opening More Than One Database at Once

Every time you use the File→Open command, Access closes the current database and then opens the one you chose. If you want to see more than one database at a time, you need to fire up more than one copy of Access at the same time. (Computer geeks refer to this action as starting more than one instance of a program.)

It’s almost embarrassingly easy. If you double-click another database file while Access is already open, then a second Access window appears in the taskbar for that database. You can also launch a second (or third, or fourth…) instance of Access from the Start menu, and then use File→Open to load up a different database in each one.

Opening a Database Created in an Older Version of Access

You can use the File→Open command to open an Access database that somebody created with a previous version of Access.

Access handles old database files differently, depending on just how old they are. Here’s how it works:

  • If you open an Access 2002-2003 file, you don’t get any notification or warning. Access keeps the current format, and you’re free to make any changes you want.

  • If you open an Access 2000 file, you’re also in for smooth sailing. However, if you change the design of the database, the new parts you add may not be accessible in Access 2000.

  • If you open an older Access file (like one created for Access 97, 95, or 2.0), Access asks whether you want to convert the database or just open it (see Figure 1-16).

Access gives you a choice when you open a database file that was created in Access 97, 95, or 2.0. If you choose to convert the database (click Yes), Access copies the existing database into a new database file, in Access 2002-2003 format. You can then edit this copy normally. If you choose to open the database (click No), Access opens the original file without making a copy. You can still edit existing data and add new data, but you can’t change the database’s design.

Figure 1-16. Access gives you a choice when you open a database file that was created in Access 97, 95, or 2.0. If you choose to convert the database (click Yes), Access copies the existing database into a new database file, in Access 2002-2003 format. You can then edit this copy normally. If you choose to open the database (click No), Access opens the original file without making a copy. You can still edit existing data and add new data, but you can’t change the database’s design.

Tip

You can always tell the current database’s format by looking at the text in brackets in the Access window’s title bar. If you open an Access 2002-2003 file, the title bar might read “Bobblehead: Database (Access 2002-2003 file format)”.

When you open an old-school Access database, you’ll notice something else has changed. When you open a table, it won’t appear in a tabbed window (like the ones shown in Figure 1-19). Instead, the table opens in an ordinary window that can float wherever it wants inside the main Access window. This seems fine at first, until you open several tables at once. Then, you’re stuck with some real clutter, as shown in Figure 1-17.

This somewhat unfriendly behavior is designed to be more like Access 2003 and older versions of Access. But don’t worry—you can get back to the slick tabs even if you don’t convert your database to the new format. All you need to do is set a single configuration option for your database:

  1. Choose File→Options. The Access Options window appears.

  2. In the list on the left, choose Current Database.

  3. Under the Application Options heading, look for the Document Windows Options setting, where you can choose Overlapping Windows (the Access 2003 standard) or Tabbed Windows (the wave of the future).

  4. Click OK.

  5. Close and open your database so the new setting takes effect.

For a retro touch, you can use the same setting to make a brand-new Access database use overlapping windows instead of tabs.

In an old-style Access database, different windows can overlap each other. It’s not long before the table you want is buried at the bottom of a stack of windows.

Figure 1-17. In an old-style Access database, different windows can overlap each other. It’s not long before the table you want is buried at the bottom of a stack of windows.

Get Access 2010: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.