Unique Index Error Message

  • Thread starter Thread starter phil4
  • Start date Start date
P

phil4

Guest
I am trying to establish a one to many relationship between two tables similar to the one in Northwind where the Products table is related to the Order Details table in a one to many relationship via the ProductID field. I am getting a error report as follows: "No unique index found for the referenced field of the primary table"

Can anyone advise what this means & how to get around it?

Thank you
 
The ProductID field in the Products table should be an autonumber and the Primary Key for the table. It should look bold in your Relationship window. The ProductID in the related table should be a Long Interger data type and does not need to be a compound key as in the Northwinds example.

Here is an example:

tblProducts
ProductID (Primary key and autonumber)
ProductName
...other fields...

tblDetails
DetailsID (Primary key and autonumber)
ProductID (Foreign key and long integer)
...other fields...

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom