Home > Articles

  • Print
  • + Share This
This chapter is from the book

Ensuring Referential Integrity

AC07S-1.2.2

Referential integrity in table relationships keeps users from accidentally deleting or changing related data. If a primary table contains a list of employees and related tables contain additional information about those employees, and an employee quits, his record is removed from the primary table. His records should also be removed in all related tables. Access allows you to change or delete related data, but only if these changes are cascaded through the series of related tables. You can do this by selecting the Cascade Update Related Fields and Cascade Delete Related Records check boxes in the Edit Relationships dialog box.

Ensure Referential Integrity

yellow_circle_1.gif Click the Database Tools tab.

yellow_circle_2.gif Click the Relationships button.

yellow_circle_3.gif Click the join line for the relationship you want to work with.

yellow_circle_4.gif Click the Edit Relationships button.

yellow_circle_5.gif Select the Enforce Referential Integrity check box to ensure that referential integrity always exists between related tables in the database.

yellow_circle_6.gif If you want changes to the primary field of the primary table automatically copied to the related field of the related table, select the Cascade Update Related Fields check box.

yellow_circle_7.gif If you want Access to delete records in the related tables whenever records in the primary table are deleted, select the Cascade Delete Related Records check box.

yellow_circle_8.gif Click OK.

  • + Share This
  • 🔖 Save To Your Account