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 Trouble!!!! 1

Status
Not open for further replies.

blindlemonray

Technical User
Nov 24, 2003
130
0
0
GB
Can anyone Help? I have a DB where there is a "number" field which is used as the primary key, but also as a reference number for the customer.

I need to change the field to an "autonumber" field so that when more records are added they will have unique ref number.... but keep all the current reference (primary key) numbers as they are attached to all the current records!!!

Can this be done? or am I just dreaming!! Any help on this would be much appriciated!!
 
In the database window, copy the table - structure only.
Chnage the field definition of the key field to autonumber.
Create an append query based on the old table and append everything to the new table.
Run the query.
Rename the tables.

The autoniumber will carry on fron one later than the highest number you used before.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top