adding primary key to table

H

harvey

I want to add a primary key to an existing table. After
creating id field, no duplicates,whole number, and setting
id value to primary, I get error messages preventing me
from creating value. Solutions or explanations would be
appreciated for access 2000 user.
 
A

Arvin Meyer

First purge whatever duplicates you may have with the Find Duplicates query
wizard. Then add an autonumber to your table save the table then add the
index Primary Key to the autonumber field that you just added. That's it.

There are other ways, but that is the easiest.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
J

John Vinson

I want to add a primary key to an existing table. After
creating id field, no duplicates,whole number, and setting
id value to primary, I get error messages preventing me
from creating value. Solutions or explanations would be
appreciated for access 2000 user.

How are you filling this field? Does it have any values at all (or is
it using the default value of 0)?

Just specifying that a field doesn't *permit* duplicates won't fill it
with values that don't *have* duplicates!
 

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