Setting relationship between tables step by step
Answers
On the Database Tools tab, in the Relationships group, click Relationships.
If you have not yet defined any relationships, the Show Table dialog box automatically appears. If it does not appear, on the Design tab, in the Relationships group, click Show Table.
The Show Table dialog box displays all of the tables and queries in the database. To see only tables, click Tables. To see only queries, click Queries. To see both, click Both.
Select one or more tables or queries and then click Add. After you have finished adding tables and queries to the Relationships document tab, click Close.
Drag a field (typically the primary key) from one table to the common field (the foreign key) in the other table. To drag multiple fields, press the CTRL key, click each field, and then drag them.
The Edit Relationships dialog box appears.
Edit Relationships dialog box
Verify that the field names shown are the common fields for the relationship. If a field name is incorrect, click on the field name and select the appropriate field from the list.
To enforce referential integrity for this relationship, select the Enforce Referential Integrity check box. For more information about referential integrity, see the section Enforce Referential Integrity.
Click Create.
Access draws a relationship line between the two tables. If you selected the Enforce Referential Integrity check box, the line appears thicker at each end. In addition, again only if you selected the Enforce Referential Integrity check box, the number 1 appears over the thick portion on one side of the relationship line, and the infinity symbol (∞) appears over the thick portion on the on the other side of the line, as shown in the following figure.
Drag a field from one table to the matching field in the other table.