Share this Page URL

Chapter 3. Managing the Consistency, For... > Fixing Referential Integrity Errors - Pg. 79

Managing the Consistency, Format, and Integrity of Your Data 79 4. Click OK in the message box, click Cancel in the Edit Relationships dialog box, and then close the Relationships window. If you open the table named MarketCampaignsWithError, you'll see that the entry for the cam- paign in Spanish is assigned to employee number 11. If you look in the Employees table, you'll see no employee with the ID 11. Remember that to enforce referential integrity, you can't have a record in the related table that doesn't match a primary key in the primary table. The data in these tables doesn't conform to this rule, so Access won't create a relationship that enforces referential integrity. When you need to create a table relationship and enforce referential integrity but the state of the data prevents you from doing so, you can use a builtin Access query to identify the records that aren't correctly matched. If you're dealing with hundreds or thousands of records rather than just a few, using this query will save you a lot of time. Here are the steps to run the query