primary key

K

Kay

When I try to make a field the primary key and save it, it
tells me that I can not make a field with a "null" value
the primary key. It says that on all of the fields I have
tried. So, how do I make a field not be of a "null" value
so that I can make it a primary key, which I am trying to
do so I can keep from haveing duplicate records in a
query.

Thanks, Kay
 
L

Lynn Trapp

You need to insert some unique value into the field for every record in the
table. Without knowing more about the field and it's datatype that's about
all I can say at this point.
 
T

Tom Ellison

Dear Kay:

To make a column to be part of a primary key, it must have Required =
Yes (for Jet). Before you can do this, you may need to make sure
there are no NULLs in that column. Otherwise, it won't allow you to
set Required = Yes for that column.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
T

Tom Ellison

Dear Kay:

Write a query like this:

SELECT * FROM YourTable WHERE YourColumn IS NULL

That will tell you if there are, and help you find them, if there are
any.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Top