Starting a New Database


When you re ready to start a new database, you have two options. You can use the Access Database Wizard to walk you through the process and help you choose the fields you want in a specific type of database, or you can do it yourself by creating a new blank database.

Help Me, Mr. Wizard!

The first time you create a database, it s a good idea to use the wizard and see how Access does it. You begin by choosing a template of the style you want, then the automated wizard leads you through everything you need to know ”all you do is answer the questions and select the options you want to use. Here s the process:

  1. In the Getting Started task pane, click Create A New File.

  2. In the Templates area of the New File task pane, click On My Computer.

  3. In the Templates dialog box, click the Databases tab. Choose the type of database closest to the one you want to create; then click OK.

  4. In the File New Data dialog box, enter a name for the new database and click Create. The Database Wizard begins and leads you through a series of questions that enable you to choose the types of tables you ll include, the way the data labels will look, the kind of reports you want to create, and the title of the database. Make your choices on each screen, and click Next to advance the wizard.

    start sidebar
    Aha! ”Picture Data

    If you want to include a picture on the records (for example, if you have a business logo, a special symbol, or yes, a puppy picture you d like to include), click the Yes, I d Like To Include A Picture check box. Navigate to the folder containing the picture you want to use, select it, and click OK to return to the Database Wizard.

    end sidebar
     
  5. Click Finish to complete the wizard and create the new database.

Access displays a status window as it goes through and creates all the elements and tables for the new database. After a moment, the Main Switchboard appears in your Access work area (as shown in Figure 16-2). This is the menu you ll use to add, view, update, and print the data in the new database.

click to expand
Figure 16-2: The Main Switchboard includes choices for the main Access tasks you re likely to perform.
start sidebar
Aha! ”Using the Switchboard

The Main Switchboard is available only if you have used the Database Wizard to create a database. It s a great way to put a friendly face on what can be complicated databases, especially if other people will be adding information to the database you ve created. You can customize the Switchboard if you choose by selecting Change Switchboard Items.

end sidebar
 

Create a New Database from Scratch

If you re one of those people who d rather do things, you can create a database with a few simple clicks of the mouse. The process isn t difficult, but what you miss is the create-it-all- at-once technique that the wizard offers. You also won t have the same look and feel for your data-entry form and your reports, but that s no big deal. You can learn those things as you go. (And besides, you ll learn how to create, format, and print reports in Chapter 18, Preparing and Printing Reports in Microsoft Access. )

Here are the steps for creating a database from scratch:

  1. In the Getting Started task pane, click Create a New File.

  2. Click Blank Database in the New area of the task pane.

  3. In the File New Database window, navigate to a folder in which you want to store the database file, enter a name for the file, and then click Create. The new database is created (in this case, the database for Newfie pups), and displayed in a database window with the file name you specified, as shown in Figure 16-3.

    click to expand
    Figure 16-3: The new database file is created and displayed as a data table in your Access work area.

Creating Tables and Fields

When you create your database from scratch, you need to set up the tables and the fields you want to use in your database. (For the moment, all you have is a database file.) The tables collect the records related to a specific item (for example, you might have a puppies table and a potential buyers table). Fields store the individual data items that comprise each record ”for example, name, address, city, state, product name, and so on. You ll use a different wizard to help automate the process of creating the tables and fields for your new database file. Here are the steps:

  1. Open your database (if necessary) by choosing Open from the File menu, and clicking the new database name in the task pane. The database window opens in the Access work area.

  2. Double-click Create Table By Using Wizard. The Table Wizard appears, as shown in Figure 16-4.

    click to expand
    Figure 16-4: The Table Wizard prompts you to choose the fields you want to include in the new table.

  3. In the Sample Tables list, click the table type you want to create. The Sample Fields list in the center of the dialog box changes to show the fields typically used in that table.

  4. Click a field you want, and click the Add button to add it to your table. If you want to add all the fields in the Sample Fields list, click Add All.

    start sidebar
    Aha! ”Adding Fields Quickly

    If you plan to use the majority of the fields, a quick way of adding the fields you want is to click Add All, and then, in the list showing your database fields, click the individual fields you don t want. Then click Remove to put them back in the Sample Fields list.

    end sidebar
     
  5. If you want to change the name of any field you add to your form, click the field you want to change, then click Rename Field. In the Rename Field dialog box, type the new name and click OK.

  6. Enter a name for the table, leaving the primary key option set the way it is. (The primary key is the field by which Access first sorts your data. For example, Customer ID would be a good candidate for a primary key, because it uniquely identifies each customer record. For most purposes, you can let Access set this for you.) Then, click Next.

  7. Choose whether you want to modify the table, enter data, or have the wizard create a form in which you can enter data. We ll create a form later in this chapter, so leave the middle option selected, and click Finish to create the table. The table appears, showing the fields you added, in Datasheet view, ready for you to add data (as shown in Figure 16-5).

    click to expand
    Figure 16-5: The Table Wizard creates the table and displays it in Datasheet view, with your field names as column headings and the first row selected, ready to receive the data you enter.

start sidebar
Aha! ”Inserting a Field After the Fact

Did you forget a field you need? You can add it easily by clicking the column label to the right of the column you want to add. Choose Column from the Insert menu, and Access adds a new column with the label Field1. Double-click the field name to select it; then type a name for that field, and press Enter.

end sidebar
 
start sidebar
More Than One Way to Create a Table

The database window offers you two additional ways to create a table in your database. You can use Design view to create the table and add fields, or you can simply create the table by entering data. When you choose Create Table In Design View, Design view is displayed, and you add the field name, type, and a description for each field you create. Your field names can include as many as 64 characters , and you can choose a field type, which refers to the type of data that is to be stored in the field, by clicking in the Data Type column and clicking the down arrow that appears. Simply click the data type you want to assign to the field. (You can choose from Text, Memo, Number, Date/Time, Currency, AutoNumber, Yes/No, OLE Object, HyperLink, or Lookup Wizard.)

If you choose Create Table By Entering Data, Access creates the table, names it Table1, and displays a spreadsheet-like grid in which you can enter data. Change the field names by double-clicking the Field1, Field2 and similar labels, and type the name you want: Name, Address, and so on. You can then enter the information directly into the table, pressing Tab to move from field to field.

end sidebar
 



Faster Smarter Microsoft Office System
Faster Smarter Microsoft Office System -- 2003 Edition
ISBN: 0735619212
EAN: 2147483647
Year: 2003
Pages: 238

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