Whether you use Access 95, 97, or 2000, the process for creating a table is very much the same:
- Start Microsoft Access.
- Choose to create a blank database.
- Select the folder for the database, and type in a name for it.
- Click on the "Create" button.
- Click on the "Tables" tab.
- Click on the "New" icon in the toolbar.
- A window titled "New Table" will appear.
- Select "Design View" from the list.
- Click on "OK".
- You will see a new window with 3 columns.
Fill in one row for each field from your paper version of the table.
Field Name: |
Avoid using spaces and underscores or other punctuation. Simply type in the name of the field using proper case,
i.e.: FirstName. |
Data Type: |
This is a drop-down list of data types. Select the type of data that will be stored in the field. General rule of thumb: Only make it a number if the field contains a value that you will be doing a calculation on. Example: A zip code is a 5-digit number, but the data type should be text because we don't do any arithmetic on the zip code. The exception to this rule of thumb is if the field is a foreign key - in which case the data type should be a number of type long (because auto-number fields are usually of type long). |
Description: |
This is an optional column. Fill in a description of the purpose of the field. This is mainly for documentation purposes. |
- With the focus on the row containing the id field, click once on the key icon in the toolbar. This will make that field the primary key.
- Save the table and close the window.
- Repeat these steps for all other tables.
Once all tables are created, you will want to set up the relationships between the tables.
- Click once on the "Relationships" icon in the tool bar (3 squares with 2 lines connecting them).
- A window titled "Show Table" will appear. It will list all tables in your database.
- For each table in the list, click once on it and click the "Add" button. Alternatively, double-clicking the table will achieve the same effect.
- You will see a representation of the table appear in the background window.
- Click on the "Close" button.
To create a relationship between two tables, you need to create a link between the primary key of one table and the foreign key of the other.
The primary key is the field marked as such when you created the table. The field name will be in bold lettering.
The foreign key should have the same name, but exist in a different table.
- Right-click and hold on the primary key of one table.
- Drag to the foreign key of the second table.
- Release the mouse button.
- A window title "Edit Relationships" will appear.
- Click on each of the checkboxes in the bottom half of the window.
- Click on the "Create" button.
- Repeat steps 1-6 until all tables are linked.
- Close the window.
- You will be prompted to save the changes.