Help with a multiple field index

S

SteveH

I am building a data base of equipment across several manufacturing
facilities. There are several pieces of equipment in each facility. I have a
table that contains facility name and equipment ID among other fields. More
than one facility may use the same ID for a piece of equipment but the
combination of facility and ID are unique. I am trying to assign a multiple
field primary key to this table but when I try to save I get a pretty
generic error message that lists a number of probable causes. The only cause
that seems to fit is that the index need to be set to accept duplicate
entries. When I try to set unique to no in the index properties I get
another error message that says I can't set the unique property to on a
primary key. I am confused and bewildered by this. Can any one help me on
this apparently simple task?

TIA

Steve H
 
J

Jeff Boyce

Steve

It sounds like there's a chance your "unique" combination is, in fact, not.
Have you run a query (Find duplicates) against the data to confirm that
there are no matches on Facility + EquipmentID By the way, if there is NO
chance that two facilities would have the same name, keep on with your
approach. If thee is ANY chance two could use the same name, create a
Facilities table and assign a unique ID to each. Your table in question
then lists ID pairs for Facility and Equipment.
 
S

SteveH

Jeff,

You were absolutely right. In spite of by best efforts to check the
integrity of the data I found not only one but two typos that resulted in
duplicates. Thanks for your insight.

Steve
 

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