How do i turn on Auto Number in Microsoft Access?

G

Guy Pearson

I can't get auto number to turn on after i have inputted some numbers in to
the primary key column
 
A

Allen Browne

No, you can't turn a Number field into an AutoNumber field.

Select the table in the Database window.
Copy (Ctrl+C), and Paste (Ctrl+V).
Answer the dialog that you want the structure only, and supply a new name.
Open in design view. Delete the Number column. Save.
Add an AutoNumber column. Save.

Create a query into the old table.
Change it to an Append query (Append on Query menu), and tell it you want to
append to the new table.
Run the query. This imports all the old records into the new.

You now have a new table, with an AutoNumber column, and the data with the
values you wanted. You can delete your old table.
 
J

John Vinson

On Mon, 25 Oct 2004 08:19:03 -0700, "Guy Pearson" <Guy
I can't get auto number to turn on after i have inputted some numbers in to
the primary key column

That's correct. It's not something you turn on; it's something you
design in from the start.

Create a new table by copying and pasting this one, design mode only;
change the field type of the field from Long Integer to Autonumber;
and then run an Append query to fill it with the data from your
current table.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Top