Resetting auto-number back to 1?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have several tables that are used over and over again. Before each use, the
tables are cleared. I have a primary key that's an autonumber field, and need
to set it back to 1 prior to each run. How do I do that please? (Note that
there are actually 5 tables, all of which have their own autonumber fields
which must be reset.)

Thanks!
 
Fave you searched for this answer?

I think you have to delete all the entries, then compacct.

You should be able to find previous posts that address this issue.

Rick B
 
Would you like this automated to a click of a button? Contact me at my email
address below.
 
Rick, I tried your method and was unable to reset the auto-numbers. Can you
(or someone) provide me with a link to where I can get this information?

Thanks!
 
To compact the database:
Tools | Database Utilities | Compact

If that does not reset the AutoNumbers, you need the service pack for JET 4.
It's available from support.microsoft.com, in the Downloads section.

If you want to reset the autonumbers programmatically, you can use ADOX to
set the Seed property of the Column in the Table.
 
Back
Top