Table relationships

R

Robert_DubYa

I've created a table that has two fields that together they make my primary
key. I am trying to create a relationship between two tables (Enforcing
Referential Integrity). When the enforce referential integrity button is
clicked i get a message that says "No Unique index found for the refrenced
field of the primary table". My two fields together do create a unique
"key". Any clue on what I may be doing wrong?
 
A

Allen Browne

In the relationship window, when you drag the field from one table onto the
other, Access pops up the Create Relationship dialog. On the first line of
the dialog, it fills in the first field for you, but you need to type in the
2nd field (and the matching field in the other table) into the 2nd row of
the dialog.

If that is not the issue, make sure the direction of your relation is
correct. That is, make sure the Primary table (as shown in the Create
Relationship dialog) is the one that has the 2-field primary key.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top