Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Multi-Key Index (2007)

    I have a Master table with two non-unique index fields which I've used to create the unique Primary Index. I have a many table with the same two non-unique index fields. In edit Relationships I've been able to join these two tables on the two fields. However, when I attempt to set Enforce Referential Integrity I get the error "No unique index found for the referenced field of the primary table." Any thoughts as to how to resolve the probem?

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Multi-Key Index (2007)

    If you have specified those 2 fields as the Primary Index in the "one" table, then you shouldn't see this message. The existence of thismessage indicates to me you didn't do something correctly.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Re: Multi-Key Index (2007)

    Mark,

    Ah the elusive "something". I've gone over this several times and my eyes just can't spot my error. If you would be so kind as to take a look and let me know what you see. A_tblSection_Text_wTokens is my Master/One table and A_tblSection_Text_TokensApplied is the Many table.

    Thanks in advance for a fresh pair of eyes.
    Marty
    Attached Files Attached Files

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multi-Key Index (2007)

    You had drawn the relationship in the wrong direction.
    You should drag the rptID field from A_tblSection_Text_wTokens to rptID in A_tblSection_Text_TokensApplied, then add the DFTextID field on both sides and tick the "Enforce Referential Integrity" check box.

  5. #5
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Re: Multi-Key Index (2007)

    Wow!! I never realized Edit Relationships was sensitive to the drawing direction.

    As always, thanks for your assistance.
    Marty

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multi-Key Index (2007)

    Yes, it does matter. You should drag from the "one" side to the "many" side of the relationship.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •