Convert numeric field to Autonumber

  • Thread starter Thread starter CMB
  • Start date Start date
C

CMB

Is there a way to convert an existing numeric field to be an autonumber
field? I am converting data and would like to keep the current sequence in
a field but have it autonumber....

Thank you
 
You can create an empty table with the autonumber field
and then run an append query into that table.

HTH
 
Yes.

1.Create a new blank table with your field changed from Number to Autonumber.
2.Use VBA code for append old records into new table (use recordsets).You
must sort ascendind older table !
3.If old field (number) have "gap" between record, is necessary to insert
new record into new table WITHOUT Update (use just Add). This will increment
Autonumber field.
4.Delete old table

PS Sorry for my (bad) english...


"CMB" a scris:
 
1. Copy the table using copy-and-paste. Select [Structure Only] when the
[Paste Table As] dialog is displayed.

2. Create an append query to copy the data (including the numeric field
you're converting to Autonumber) to the new table.

3. Change the numeric field to Autonumber.

That's it! When you add new data to the new table, the next number will be 1
higher than the highest number you had before.

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
 
Back
Top