Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autonumber/Number Question 1

Status
Not open for further replies.

EastIndian

Technical User
Mar 21, 2002
18
0
0
US
I have inherited an Access database developed by someone else. The primary key in the main table is a number field. This field should be an autonumber field. How do I change the primary key to an autonumber field starting at number 99401? I realize that I can not simply change the field type. I have the idea that I can copy the exising records into a new table (there aren't too many, but enough to not want to redo this whole thing) w/ an autonumber primary key, but I do not understand how to change the start number of the autonumber category. Thank you for any help.
 
Hi,
You can't change the starting point of an autonumber. The only way to do what you want to do, if to create an empty table with the same structure, in this new table put an autonumber field. Now with a procedure, add to this table 99400 records and delete them all after. Once this is done, insert all the records from the original table to the new one (except the key). Normaly the autonumber will start at 99401

Hope it can help
Mal'chik [bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top