Creating a Database Table from Scratch


graphics/02inf12.jpg

graphics/one_icon.jpg

After you've created or opened the database for which you want to create a table, click the Tables option in the Objects bar in the database window.

graphics/two_icon.jpg

Double-click the Create table in Design view option.

graphics/three_icon.jpg

A blank table opens in Design view, containing Field Name , Data Type, and Description columns . In the Field Name column, type a name for the first field and then press Tab .

graphics/four_icon.jpg

To change the data type from the default, Text, click the down arrow in the Data Type field and choose a new data type from the list that appears. Then press Tab .

INTRODUCTION

There may be times when you want to create a table from scratch instead of using Access's Table Wizard. In this case, you create a blank table and then create each of the fields by hand ”typing a field name, selecting a data type, and, optionally , entering a field description. You can include as many fields as needed in your table.

TIP

Understanding Field Names

You must use a unique name for each field in your table, and it's a good idea to use descriptive names that remind you of the contents of that field. A field name can include as many as 64 characters .

graphics/02inf13.jpg

graphics/five_icon.jpg

Optionally, type a field description in the Description column. This text appears in the Table window's status bar when you are entering data and this field is selected.

graphics/six_icon.jpg

Repeat steps 3 “5 as needed to continue adding fields.

graphics/seven_icon.jpg

To save the table, open the File menu and choose Save .

TIP

Understanding Data Types

For more information about the available data types, see "Setting a Field's Data Type" later in this part. In addition, Part 4 covers creating special data types.

graphics/02inf14.jpg

graphics/eight_icon.jpg

The Save As dialog box opens. Type a name for the table and click OK .

graphics/nine_icon.jpg

Access prompts you to set a primary key. Click No to set the primary key later.

graphics/ten_icon.jpg

The table is saved, and the name you typed in step 9 appears in the table window's title bar. To close the table window and return to the database window, click the Close button.

TIP

Saving Tables

The table is saved as part of the database file.

TIP

Closing the Table

If you try to close the table without saving it first, Access prompts you to save. Click Yes to save the changes to the table design.

TIP

Entering Data

After you create the table, click the View button on the Standard toolbar in the main Access window to switch to Datasheet view if you want to enter records. Part 4 covers entering data in detail.



Easy Microsoft Office Access 2003
Easy Microsoft Office Access 2003
ISBN: 789729598
EAN: N/A
Year: 2003
Pages: 174

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