Results 1 to 4 of 4
  1. #1
    Dave D is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    45

    Referential Integrity Causing Me Problems

    I am having a bit of a problem with my table relationships. When I have a 1:M set for tblAttachInfo (as shown in the attachment) and I try to add a record through the tblContractIDs table, I get the error "You cannot add or change a record because a related record is required in tblParts."

    If I remove referential integrity then I can add the record. I fail to see how there is any relationship between tblContractIDs and tblParts. The relationships are with tblAttachInfo.

    I greatly appreciate any help with this. Thanks.

    Click image for larger version. 

Name:	Ref Integ Problems.jpg 
Views:	19 
Size:	108.2 KB 
ID:	16912

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Don't know if this is cause of issue, but appear to be circular references. Review http://www.codeproject.com/Articles/...atabase-Design

    Table links should be on PK/FK fields. The link between tblContractIDs and tblSOWinfo does not involve a PK.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Dave D is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    45
    Good catch on the primary key field for the tblContractIDs and tblSOWinfo - thanks.

    This may be a circular reference but the information in the link you provided was difficult for me to follow. Sorry, this is not my strong suit. Any additional help is welcome.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Not my strength either. Many experienced developers don't bother setting up relationships because users don't (shouldn't) interact directly with tables and queries. Data integrity is managed by interaction with data through forms.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 10-03-2013, 01:35 PM
  2. Referential Integrity
    By Paul H in forum Database Design
    Replies: 3
    Last Post: 11-14-2011, 03:07 PM
  3. referential integrity
    By askjacq in forum Database Design
    Replies: 1
    Last Post: 10-14-2011, 03:23 PM
  4. Referential Integrity
    By Desstro in forum Database Design
    Replies: 4
    Last Post: 06-13-2010, 01:29 PM
  5. Referential Integrity
    By U810190 in forum Access
    Replies: 1
    Last Post: 03-29-2010, 05:21 PM

Tags for this Thread

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