No unique index found

  • Thread starter Thread starter dhstein
  • Start date Start date
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.
 
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
 
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?
 
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.
 
Back
Top