Opening a Database

After you're inside Access the adventure begins (refer to Figure 2.2). Right now, there's no active file, so let's explore the various methods for creating and opening a database:

  • Beginning with a blank file

  • Basing a new database on an existing database

  • Renaming a database

  • Using a template

As you work through these tasks , you'll learn how to use some of the basic parts of the Access interface, including the New button on the database toolbar and the task pane.

Tip

graphics/tman.gif

The Windows Quick Launch bar (to the right of the Start button) displays small representative icons for programs. Instead of browsing through all the programs on the Start menu, you can simply click the icon on the Quick Launch bar.

To add Access to the Quick Launch bar, drag the Access icon from the Start menu to the Quick Launch portion of the taskbar. That's all there is to it! If your Quick Launch bar isn't visible, right-click an empty area on the taskbar and select Toolbars, Quick Launch.


Beginning with a Blank File

There are several ways to create a database, but most of the time, you'll probably just start with a blank database that contains no data or any of the other objects you learned about in Chapter 1, "Welcome to Databases." You'll be expected to build your application from the ground up.

Here's how to create a new, blank database:

  1. Click the Blank Database link under New in the task pane to display the File New Database dialog box. If the task pane isn't open , do one of the following: Click the New button on the Database toolbar, select New from the File menu, or press Ctrl+N.

  2. In the Save In list box at the top of the dialog box, select My Documents (the default).

  3. In the File Name text box, enter a name for the databasewe entered MyDatabase .

  4. Don't change the Save As Type option, which defaults to Microsoft Office Access Databases ( *.mdb ). You'd change this option to create a workgroup file ( .mdw ), but don't do so now. At this point, your dialog box should resemble the one shown in Figure 2.3. Keep in mind that your system's file hierarchy won't be the same as ours.

    Figure 2.3. Use these settings to save a new database named MyDatabase in the My Documents folder.

    graphics/02fig03.gif

  5. Click Create , and Access displays a blank Database window similar to the one shown in Figure 2.4. The Database window appears within the overall Access window. You'll learn more about the Database window in Chapter 3, "Exploring the Database Window."

    Figure 2.4. The Database window displays the name of your new database in its title bar.

    graphics/02fig04.jpg

Note

graphics/nman.gif

Remember, we're using Windows XP in this book. If you have a different version of Windows, things will look differentbut Access will still work fine! Access 2003 runs on Windows 2000, Windows XP, or Windows 2003 Server only.


Caution

graphics/cman.gif

Access security is an advanced topic that we don't cover in this book. We recommend you not create an MDW file until you're very familiar with Access security because you could inadvertently disable your databases.


In the previous exercise, you saved a new database in the My Documents folder, which is the system's default folder. If you don't use this folder or if you save files more frequently to another folder, you can change the default. To do so, follow these steps:

  1. Select Options from the Tools menu.

  2. Click the General tab.

  3. Enter the full path of the folder you want the File New Database dialog box to default to in the Default Database Folder text box at the bottom of the page.

  4. Click OK to return to the Database window, or click Apply to save the change without closing the dialog box.

Basing a New Database on an Existing Database

It's not uncommon for users to share the same database structure without sharing the data. For instance, suppose one of your friends has created a database to keep track of her DVD collection. If you want to track your own DVD collection, you might want to start with a copy of that database and then customize it for your own use. To create a copy of an existing database from inside Access, follow these steps:

  1. Click the From Existing File link in the New section of the task pane. You can display the task pane by clicking the New button on the toolbar if necessary.

  2. In the New From Existing File dialog box, locate the appropriate folder in the Look In list.

  3. Locate the database we just created, MyDatabase , in My Documents (see Figure 2.5).

    Figure 2.5. Locate the original file in the New from Existing File dialog box.

    graphics/02fig05.gif

  4. Double-click MyDatabase , and Access creates a copy of it. If you receive a security warning, click yes. Access assigns a default name to the new database and opens a copy in Access. The default name will consist of the original file's name and the value 1 , or the most appropriate sequential value. For instance, if the original database is named MyDatabase , Access names the new copied database MyDatabase1 .

Renaming an Access Database

You'll probably want to rename any database that Access names for you. First, if you're working in a multiuser environment (in a networked copy), make sure all users have closed the database. Although Access will let multiple users work with data in a database at the same time, you must have exclusive access to rename the database. Then, from inside Access, do the following:

  1. Click the Open button on the Database toolbar to display the Open dialog box.

  2. Locate the appropriate database file using the Look In list.

  3. Right-click the file in the list.

  4. Select Rename from the resulting submenu, as shown in Figure 2.6.

    Figure 2.6. Right-click the database file in the Open dialog box to display a submenu of options.

    graphics/02fig06.gif

  5. Access highlights the file in Edit mode. At this point, enter the new name. Be sure to retain the .mdb extension.

  6. Press Enter to complete the change. However, Access will return an error because you can't change the name of an open database file. We don't really need to change the name, we just wanted to walk you through the process and experience the error. Close MyDatabase1 by clicking the Windows Close button ( X ) in the Database window's title bar.

Using a Template

Access uses the Database Wizard to base a new database on a template file. Fortunately, several templates are available from which to choose and the process is simple. In fact, we won't even walk you through the wizard process because it's so straightforward. However, we will help you get started.

Templates contain tables, forms, reports , and other objects Access uses to tie the database together. Templates provide a convenient way for you to get started with a full-blown database with very little effort. To create a file from a template, follow these steps:

  1. Open the task pane (press Ctrl+N ), and then click the On my computer link in the Templates section in the task pane.

  2. Click the Databases tab (if necessary) to display the available templates in the Templates dialog box.

  3. Double-click any of the template files shown in Figure 2.7. Or, alternatively, click the file and click OK . We chose the Asset Tracking template.

    Figure 2.7. Select a template on which to base the new database.

    graphics/02fig07.gif

  4. In the resulting File New Database dialog box, Access has assigned a default name for the new file in the File Name combo box at the bottom of the dialog box. Accept this name or enter a new one, which we've done in Figure 2.8.

    Figure 2.8. Enter a name for the new database.

    graphics/02fig08.gif

  5. Click Create . At this point, Access launches the Database Wizard, which walks you through the process of adding objects to your new database. Feel free to experiment with the wizard, or click Cancel to abandon the task. If you choose to explore the wizard, you'll be able to customize the tables in the new database by choosing what information they should contain. (You'll learn more about customizing tables in Chapter 5, "Building Your First Tables.") Then, you'll specify a display style for forms and reports or accept the template's defaults. You might want to read a few more chapters before tackling any of these changes! Finally, you'll determine the database's title. At any time, you can click Finish to accept all the template defaults and skip most of the wizard's questions.



Absolute Beginner's Guide to Microsoft Office Access 2003
Absolute Beginners Guide to Microsoft Office Access 2003
ISBN: 0789729407
EAN: 2147483647
Year: 2002
Pages: 124

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net