Autonumbering in Access

  • Thread starter Thread starter Harleston poacher
  • Start date Start date
H

Harleston poacher

Help please. Periodically I delete all records from a table. I then want
to start again with the Autonumber beginning at 1. How can I reset the
counter?

Thanks
 
Harleston said:
Help please. Periodically I delete all records from a table. I then want
to start again with the Autonumber beginning at 1. How can I reset the
counter?

Thanks

Two part answer.

1. If you care what number shows, you don't use Autonumber.

Autonumbers are designed to provide unique numbers. It in not
designed to provide numbers in order and for a number of reasons may not do
so. As a result using them in any application where the user sees the
numbers is likely to end up with confusion.

There are other ways of providing the numbers you want depending on the
particual application.

2. To do what you say you want, you need to compact the database after
deleting the records. Access does not really delete data until it is
compacted, The data is really still there, you just can't see it. This is
common in many databases even those in the old DOS days. You may want to
run a repair at the same time.
 

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

Similar Threads

Reset Autonumber 2
Autonumber Macro 3
Autonumbering Query 1
Autonumber Drastic Increase 4
Access 2007 autonumber oddity 28
autonumbers 3
autonumber error 3
Autonumber trying to create duplicates 3

Back
Top