How do I set up a primary key in Access that allows duplicates?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to set up a table with a primary key that will link to another table.
The field I need to set as the primary key will have multiple records with
the same entry (duplicates). Access will not allow a primary key to have
duplicates. Is there any way around this?
 
How can I have Black that is also White?

How can I have a Dog that is also a Cat?

How can I have Duplicates that are Unique?

What are you trying to do?

(david)
 
A primary key by definition can not contain duplicate values. If your field
correctly contains duplicate values, then it cannot be the primary key. You
will need to choose another field or combination of fields to use as the
primary key.
 
Why do you need duplicate information? If some of the fields have different
data then split the table.
 
The field I need to set as the primary key will have multiple records with
the same entry (duplicates).

That makes no sense.

The whole POINT of a primary key is that it uniquely identifies the
record - if you know the value of the PK, you can find one and only
one record with that value.

If it can have duplicates then it cannot be a primary key. Simple as
that.

Are you assuming that you must link a Primary Key in one table to a
Primary key in the related (many) side table? If so... you don't. Use
a nonunique field of the same datatype as a foreign key (and have some
*other* field or combination of fields as the Primary Key).

John W. Vinson[MVP]
 

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

Back
Top