Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No Unique Index Found???

Status
Not open for further replies.

drm184

MIS
May 25, 2001
35
0
0
US
Whenever I try to create a relationship from this one table to another table i get a message that says no unique index found for the referenced field of the primary table. The one table is a project information table, which has the project number as the primary key. The other table is the store table which has uses store number and company id number as the keys. When I try to relate these two and chose enforce refential integrity, i get the error message. The project info table is the primary table.
 
Sounds like you are missing the field in the relational table that is needed to create the relationship. You will need the following setup:

Primary Table
ProjectNumber (Primary Key)

Relational Table
Store Number (portion of Primary Key)
Company Id Number (Portion of Primary Key)
ProjectNumber ***

*** This is the field you will create the relationship to.

Per your problem, I am unable to determine if you are looking for a one-to-many or a on-to-one relationship.

If this is a customer service type tracking, you are backwards in your thinking and the table with the store number should be the primary, one store to many projects.

If you provide some more information....i.e. an example of what the database is going to do, maybe I can provide some more info.

Hope this helps..... %-) There is no I in team.

Robert L. Johnson III, A+, Network+
robert.l.johnson.iii@citi.com
 
You can create relationships in the relationship window between any old field and another. BUT if you want to establish referential integrity Access insits that one end of the link must be a primary key.

You need to nip into the primary table in design view, select the field that is your primary key (ProjectNumber) and click on the key symbol in the toolbar.
Save the table - then back in the relationship window you'll see that the ProjectNumber field is in BOLD

THEN you can establish referential integrity.

G LS


G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top