Adding an Auto number to existing data

brettvba

MrExcel MVP
Joined
Feb 18, 2002
Messages
1,030
Hi Guys, How can I add an auto number ( or something like it) to new

entrys, I know that if you start from fresh Access will auto number for you if

you set the field to auto number but what do you do with existing data?

Is there a self incrementing macro that can be made or is there a factory option?

Brett :oops:
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hi Brett, is the existing data coming in from Excel? And if so, is it related to data in other tables?
The reason I ask is that bringing in an existing Number field from an external source makes it forever a Number, not an Autonumber -- and I assume that's your hassle.
With the existing data -- is it important to keep the existing ID numbers? If YES, I have a workaround that does the job in a booking/invoicing system that I put together. It involves a query and a bit of code, but no too tricky. Reply if you need more info on this.
If NO, delete the existing IDs and replace them with a new Autonumber field.

Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,221,553
Messages
6,160,468
Members
451,649
Latest member
fahad_ibnfurjan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top