Defining a relationship between tables
1. Close all the tables that you may have open and in the database window choose Tools - Relationships or click on the Relationships button. The Show Table dialog box will be displayed if there are no relationships already created, otherwise you will be presented with all existing relationships and the option to add more tables.
2. Select each table that you want to be related, then click Add. To select multiple tables hold down the Ctrl key and click on each table. Close the Show Table dialog box.
3. Drag the primary key field which appears in bold text from one table to a similar field (the foreign key) in the child table.
Remember, related fields do not have to have the same names but they must have the same data type and hold the same kind of information. Number fields similarly must have the same fieldsize and you can match AutoNumber fields with Number fields if the fieldsize property is set to Long Integer.
4. Click Create in the relationship dialog box. Hopefully you will have successfully established a link and a line denoting the relationship will be displayed. If you drag a field that is not a primary key and does not have a unique index to another field an indeterminate relationship will be created.
5. To save the relationship layout close the Relationships window. Microsoft Access will ask you if you wish to save the layout, click Yes.
6. To view the relationships you have created click on the Show All Relationships button on the toolbar. To view only those relationships defined for a particular table click on the table and then select Show Direct Relationships on the toolbar.