change to Auto number

G

Guedj54

I have imported data to access (field name: Product_ID, Data type:
Number) from excel. All fine.
It is a list of ID at random increment (1,2,9,10,11,12,24,25,26,27…)
Now the problem is that I will need to change the Data Type to
AutoNumber from now on with a fix increment of one
(27,28,29,30,31,32…), since I will be populating the table it belong
too through access.
Access does not let me change the data Type to AutoNumber .

Any ideas?
 
T

Tim Ferguson

(e-mail address removed) (Guedj54) wrote in
Access does not let me change the data Type to AutoNumber .

Create a new table with all the fields as you want them, but with the AN
field set to autonumber rather than integer. Then append the existing data
with an INSERT query. Any new records will carry on incrementing the AN
field from the highest-so-far. I'm not completely sure what will happen if
you put a negative number into a Autonumber field...

B Wishes


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top