Relationships

  • Thread starter spcscooter via AccessMonster.com
  • Start date
S

spcscooter via AccessMonster.com

What does this mean when creating a relationship?
No unique index found for the referencedfield of the primary table.

I am trying to add to a relationship.
 
R

ruralguy via AccessMonster.com

No PrimaryKey in the PrimaryTable.
What does this mean when creating a relationship?
No unique index found for the referencedfield of the primary table.

I am trying to add to a relationship.
 
J

John W. Vinson

What does this mean when creating a relationship?
No unique index found for the referencedfield of the primary table.

I am trying to add to a relationship.

It means exactly what it says: that you are trying to create a relationship
from a primary table, but there is no unique index on the field that you're
using for the relationship. This is required for Access to be able to
unambiguously determine which record in the "one" table is related to the
records in the "many" table.

Normally you would have a Primary Key field in the primary table, and use that
field for the relationship. If you are trying to join on some other field,
that field should have a unique Index defined.
 
S

spcscooter via AccessMonster.com

Can you maybe give me something to look for that is causing this error. All
I remember is that I had what I wanted but tried to add a new field, then all
hell broke loose. I just need some direction on what to look for.
 
R

ruralguy via AccessMonster.com

What are the data types of the two fields that you are trying to relate?
Can you maybe give me something to look for that is causing this error. All
I remember is that I had what I wanted but tried to add a new field, then all
hell broke loose. I just need some direction on what to look for.
[quoted text clipped - 10 lines]
field for the relationship. If you are trying to join on some other field,
that field should have a unique Index defined.
 
J

John W. Vinson

Can you maybe give me something to look for that is causing this error. All
I remember is that I had what I wanted but tried to add a new field, then all
hell broke loose. I just need some direction on what to look for.

You're evidently trying to create a Relationship by joining TableA.FieldA to
TableB.FieldB. (It is possible that your table or fieldnames are different...
I can't see them from here <g>).

For this to succeed, FieldA needs to be the Primary Key of TableA; or else you
must use the Indexes tool to create a unique Index on FieldA.

If you do not have a unique index on either FieldA or on FieldB, then Access
has no way to know which is the "one" and which is the "many" side of the
relationship, nor can it enforce referential integrity.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top