Results 1 to 3 of 3
  1. #1
    zkrucz is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2016
    Posts
    103

    Violation of referential integrity rule (one to many relationship)

    Click image for larger version. 

Name:	Access Referential Integrity Rule Violation.JPG 
Views:	16 
Size:	44.0 KB 
ID:	41029My company provides a service of testing drinking water backflow devices (the device prevents drinking water from backing into the source – one direction flow only)<br>I am starting to set up a new database which would track all tests on various backflow devices and I have 3 Tables.<br><br>Address List with unique PWS ID#s (Public Water System)<br>Backflow Device Table (Unique device Serial#)<br>And, Table# which list all the tests.<br><br>I have created the 3 Tables as shown below.<br><br>The problem that I am facing is that when try to link the Backflow Device List and the Address List, I can’t enforce the referential integrity rule. The error message states that the Backflow Devices List violates the rule.<br>However, I was able to enforce the referential integrity rule when I linked The Backflow List to my Table3 Tests.&nbsp; I get a similar error when I attempt to link Table3 to the Address List (this time the error refers to Table# as the one violating the rule.<br>&nbsp;<br>Please advise how to resolve this problem so that I can link all three tables enforcing the referential integrity rule.<br><br>

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    enforcing integrity requires a child (the many) has to have a parent (the one). The implication is either you have already created records before you tried to enforce integrity and some of those records either do not have an associated parent record or the field is not populated. Or you have different datatypes for the two fields - perhaps you are using lookups in the table

  3. #3
    zkrucz is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2016
    Posts
    103
    Quote Originally Posted by Ajax View Post
    enforcing integrity requires a child (the many) has to have a parent (the one). The implication is either you have already created records before you tried to enforce integrity and some of those records either do not have an associated parent record or the field is not populated. Or you have different datatypes for the two fields - perhaps you are using lookups in the table
    Thank you! The problem was the missing records. Life is good!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Problem with Relationship Referential Integrity
    By Radtastic10 in forum Access
    Replies: 3
    Last Post: 03-22-2016, 11:03 AM
  2. Referential Integrity
    By lefty2cox in forum Forms
    Replies: 2
    Last Post: 11-30-2015, 07:26 AM
  3. Referential Integrity
    By Paul H in forum Database Design
    Replies: 3
    Last Post: 11-14-2011, 03:07 PM
  4. Referential Integrity
    By Desstro in forum Database Design
    Replies: 4
    Last Post: 06-13-2010, 01:29 PM
  5. Referential Integrity
    By jbarrum in forum Access
    Replies: 5
    Last Post: 01-14-2010, 09:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums