Table Relationships Error

Bascotie

New member
Local time
Yesterday, 19:12
Joined
Nov 10, 2008
Messages
8
First of all hello everyone, I am new to these forums.

I am also new to access and trying to finish a project but have run into a little problem..

We are working on a project which requires us to create some tables, relationships, queries, etc.

I have created all the necessary table and occupied the appropriate tables with the approriate "customer information. Step 5 of our instructions says:

5. Create relationships between tables as follows:
a. Between Dependent and Rate tables using the DepID. (Always make sure the 1 and infinity (Many) symbols end up on the side of the relationship where they make sense. Study the tables to really understand what they represent. “Each Dependent can have Many Rates.” “Each Rate can be for only one Dependent.” This means the infinity symbol must end up on the Rate table side of the relationship. Always turn referential integrity on.
b. Between Company and Rate tables using InsID.
c. Between Employee and Select tables using EID.
d. Between the Select and Rate tables using both DepID and InsID primary key atttibutes. Note that Access can figure out that the attributes are in the tables in different orders.

I have done all this but the problem is when I double click the line between relationships to enable REFERENTIAL INTEGRITY I get an error:

"No unique index found for the referenced field of the primary table"

This happens no matter which relationship I try to enforce referential integrity on. I have searched the microsoft office 2007 help section to no avail.

Any help is appreciated!
 
1. Is DepID the primary key for table Dependent? Open the table in Design view and check if there's a key picture to the left of the DepID field. If there isn't, right-click to the left on the DepID field and select "Primary Key".
2. Maybe you're dragging the wrong way. Drag the key field from the "one" side to the "many" side

Same goes for all the other relationships. If a parent table has more than one primary key column, remember to put them all in the child table.

Disclaimer: I use Access 2003. Things may be different in 2007 (never seen it).
 
Thanks I didn't know I could just drag and drop for relationships, I've been using the lookup wizard.

So now I was able to create relationships for all of them except step 5.d. in the previous post where I can create a relationship but cant set it to referential integrity.
 

Users who are viewing this thread

Back
Top Bottom