Solved Relationships - Indexing (1 Viewer)

MatthewB

Member
Local time
Today, 06:26
Joined
Mar 30, 2022
Messages
85
I am trying to create a one to many relationship between T_Buildings/BuildingNr(short text) and T_Residents/BuildingNr(short text). When I try to create this relationship I get an indexing error message. What is Access telling or asking me for? Not to index or Index (duplicates or no duplicates)? Thanks
 

plog

Banishment Pending
Local time
Today, 08:26
Joined
May 11, 2011
Messages
11,648
Gotta be a little harsh here--when you get an error message the first step in debugging isn't to post to a forum with a vague overview of the situation. It is to copy the error message and paste it into google. If that doesn't work, paste the exact error message here so we know exactly what the issue is.

With that said, where is this occuring? In the Relationship Tool? In a query? Are the two fields you are creating the relationship on the same type? It's best not to use short text fields for relationships if it can be avoided.
 

MatthewB

Member
Local time
Today, 06:26
Joined
Mar 30, 2022
Messages
85
Gotta be a little harsh here--when you get an error message the first step in debugging isn't to post to a forum with a vague overview of the situation. It is to copy the error message and paste it into google. If that doesn't work, paste the exact error message here so we know exactly what the issue is.

With that said, where is this occuring? In the Relationship Tool? In a query? Are the two fields you are creating the relationship on the same type? It's best not to use short text fields for relationships if it can be avoided.
Yes, agreed. I searched the internet but not by the words specific or the error message -"no unique index found for the referenced field of the primary key". I found an article that explained to me that the One of the one to many needs to be unique, so I index the property, Yes (no duplicates) and this allowed me to create the relationship.
 

bob fitz

AWF VIP
Local time
Today, 14:26
Joined
May 23, 2011
Messages
4,727
Yes, agreed. I searched the internet but not by the words specific or the error message -"no unique index found for the referenced field of the primary key". I found an article that explained to me that the One of the one to many needs to be unique, so I index the property, Yes (no duplicates) and this allowed me to create the relationship.
I've just searched for "no unique index found for the referenced field of the primary key" and found the following link (one of many)
 

Users who are viewing this thread

Top Bottom