Microsoft Office Tutorials and References
In Depth Information
Creating Relationships and Protecting Your Data with Referential Integrity
4. If you want matching records in the detail table to update
automatically when the value of a primary key field changes, select the
Cascade Update Related Fields check box.
5. If you want matching records from the detail table to be deleted
automatically after you delete a record in the master table, select the
Cascade Delete Related Records check box.
6. Click the Create or OK button to save your changes and close the Edit
Relationships dialog box.
The OK button replaces the Create button when you edit an existing
relationship, as opposed to creating a new one.
If you join two tables without enforcing referential integrity, the connecting
line (the join line) in the Relationships window is just a thin black line, as
shown in the top two tables in Figure 6-5. If you enforce referential integrity,
the connecting line displays 1 near the master table, and an infinity symbol
(∞) appears for the detail table, as shown at the bottom of Figure 6-5.
The relationships that you define aren’t etched in stone. You can change the
relationship between two tables at any time.
Editing and deleting relationships
Before you change or delete the relationship between two tables in the
Relationships window, you need to select the relationship you want to
change. Selecting a relationship is trickier than you think. Follow these steps
to select the join line that represents the relationship you want to change:
1. In the Relationships window, right-click the join line that you want to
change or delete.
A contextual menu displays the options shown in Figure 6-6.
If you see different options, you right-clicked too close to a table.
Clicking the line itself can be tricky: Try right-clicking nearer the center
of the join line that you want to change.