Reset autonumber

D

Del

Is there anyway to reset an autonumber field while there are records in the
table? I need to remove several records from the beginning of the table and
it would be much easier to reset the autonumber, if possible, than to account
for the missing records in the rest of my code.
 
F

fredg

Is there anyway to reset an autonumber field while there are records in the
table? I need to remove several records from the beginning of the table and
it would be much easier to reset the autonumber, if possible, than to account
for the missing records in the rest of my code.

Why bother. As soon as you 'reset' the earlier numbers and then delete
some more records you are going to have a gap again.
The AutoNumber field is to be used only to assure a unique number. It
need not be, and as you have already seen will not be if you delete
records, consecutive. Indeed, AutoNumber's can jump around even if you
do not delete records. Again, they just need to be unique.

If you have need for a field that 'numbers' records you are going to
have to create one, not using AutoNumber. Then each time you delete a
record, update the table to renumber it.
 

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