How to delete table contents and reset autonumber counters

  • Thread starter Siegfried Heintze
  • Start date
S

Siegfried Heintze

When I delete my table contents (but not the table definitions) the auto
number counters are not reset. Is there a way to reset them?

Thanks,
Siegfried
 
A

Allen Browne

Simplest way is to compact the database after deleting all records. That
should work in all versions of Access: if not, apply the latest service
packs for Office and JET, from:
http://support.microsoft.com/gp/sp

If you need to do it programmatically, it is possible in Access 2000 and
later to set the Seed of the Column in the Table, using the ADOX library.
There's a (rather involved) example of how to use these properties in this
link:
http://allenbrowne.com/ser-40.html
 

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