Changing the seed of Autonumber ?

P

Phil Hunt

I remember seeing some post on how to change the seed of autonumber, can
someone kindly respost it ?

Thanks
 
A

Allen Browne

In Access 2000 and later, you can set the Seed of an AutoNumber field
directly with ADOX code.

This example is a bit more than you need. It loops through all your
TableDefs, to automatically reset the Seed where it is below the maximum
used:
http://allenbrowne.com/ser-40.html

If you wish to raise the value, you can import a record that assigns a value
to the AutoNumber field. Example:
http://allenbrowne.com/ser-26.html

To lower the Seed after deleting records, just compact the database.
 
P

Phil Hunt

thanks. will check it out.


Allen Browne said:
In Access 2000 and later, you can set the Seed of an AutoNumber field
directly with ADOX code.

This example is a bit more than you need. It loops through all your
TableDefs, to automatically reset the Seed where it is below the maximum
used:
http://allenbrowne.com/ser-40.html

If you wish to raise the value, you can import a record that assigns a value
to the AutoNumber field. Example:
http://allenbrowne.com/ser-26.html

To lower the Seed after deleting records, just compact the database.
 

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