Microsoft Access - No unique index found...? - Asked By marlon ng on 17-Sep-09 05:31 AM

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

I'm trying to establish a relationship between two tables and this is the message I'm getting.

What does it mean and how do I fix it?

Thanks guys!

re - DL M replied to marlon ng on 17-Sep-09 05:43 AM

Try to  making another field name an AutoCounter  and Primary, then do the relationship.

No unique index found - mv ark replied to marlon ng on 17-Sep-09 05:44 AM

Check whether the primary table has a column that has been set as a primary key

For your question on "What does it mean"? - [)ia6l0 iii replied to marlon ng on 17-Sep-09 11:32 AM

With a relation that you are trying to create, it needs two sides. On one side, it needs a primary key in the first table with a unique index on it. (It is obvious that primary keys have unique indexes) and on the other side, it needs a column in another table that is designated to have values that are present in the primary key column of the other table (the foriegn key) You need to use these two in a relationship.
what if.. - Asked By marlon ng on 21-Sep-09 04:45 AM
Hi web mavin.  In your example, suppose there's a 'ProductName' field in both 'tblProducts' and 'tblDetails' tables, could I establish a relationship between these two tables using ProductName? Or does it always have to be the Primary key and Foreign key? I'm asking this because what if I don't want the ProductID field to show in 'tblDetails'? Could I hide it somehow so the user will only see ProductName?