No unique index found

D

dhstein

I have a situation where I have table "A" and table "X". Table A has a field
with a one-to-many relationship with a field in table "X" and referential
integrity is enforced. Because now I've realized that I need a better
design, I decided that I need to break table "A" into 2 tables "B" and "C"
"B" and "C" will be related by a new field and I want to relate "C" to "X" on
the same field as before.
When I drag the field in the relationship window I get the message "No
unique index found for the referenced field of the primary table" I believe
that the field in table C has unique values. Thanks for any help you can
provide.
 
J

Jeanette Cunningham

Hi dhstein,
create a query on that field from table C.
Drag the same field onto the query grid a second time.
Convert the query to a totals query - right click on the grid and choose
Totals.
For the 1st column choose Group By in the Total: row, for the 2nd column
choose Count.
Under the 2nd column put >1 for the criteria.
Change to datasheet view and see which records are showing.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
J

John W. Vinson

When I drag the field in the relationship window I get the message "No
unique index found for the referenced field of the primary table" I believe
that the field in table C has unique values. Thanks for any help you can
provide.

It may have unique values - but does it have a unique Index, such as a Primary
Key?
 
H

hor vannara

dhstein said:
I have a situation where I have table "A" and table "X". Table A has a
field
with a one-to-many relationship with a field in table "X" and referential
integrity is enforced. Because now I've realized that I need a better
design, I decided that I need to break table "A" into 2 tables "B" and "C"
"B" and "C" will be related by a new field and I want to relate "C" to "X"
on
the same field as before.
When I drag the field in the relationship window I get the message "No
unique index found for the referenced field of the primary table" I
believe
that the field in table C has unique values. Thanks for any help you can
provide.
 

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