Changing the seed of Autonumber ?

  • Thread starter Thread starter Phil Hunt
  • Start date Start date
P

Phil Hunt

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

Thanks
 
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.
 
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.
 
Back
Top