Share this Page URL

Chapter 3. Managing the Consistency, For... > Cascade Update and Cascade Delete - Pg. 76

Managing the Consistency, Format, and Integrity of Your Data 76 7. 8. 9. This message tells you that the record you are trying to delete is related to a record in another table. Because referential integrity is enforced in this relationship, Access won't let you delete the record. If you could delete a record from the MarketingCampaigns table when that record is related to a record in another table, you'd be left with orphaned records. You'd have cam- paign expense records for a campaign that no longer existed in the database. If you had to account for the campaigns you spent money on, you might have an inaccurate report. Click OK in the message box, and then close the MarketingCampaigns table. In the Database window, open the Customers table. Click in the Customer ID field in the first row for the company Alfreds Futterkiste, and then change ALFKI to ALFST. Close the table, and you'll see the message shown here: 10. A third rule of referential integrity is that you can't change the value of a primary key in the primary table if another table contains related records. (You'll learn about an option in Access that lets you override this restriction in the next section.) Click OK in the message box, and then click Yes in the dialog box indicating that you can't save the record.