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

J

Jamie

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?
 
D

david epsom dot com dot au

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)
 
B

Brendan Reynolds

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.
 
K

KARL DEWEY

Why do you need duplicate information? If some of the fields have different
data then split the table.
 
J

John Vinson

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]
 
Top