Auto Number Reset

R

rundmcnj

How do I reset my Auto number to 0000 after putting in some test numbers it
now starts at 0010 even after I delete the data?
 
K

KARL DEWEY

Try this --
Delete all the records then Compact & Repair. Close database. Open and
append one record with 0 for the autonumber field and anything for one other
field.
The next records should be 1.
 
F

fredg

How do I reset my Auto number to 0000 after putting in some test numbers it
now starts at 0010 even after I delete the data?

Delete the data AND compact the database.
Tools + Database Utilities + Compact and Repair

Note.... It really doesn't matter what value the auto number starts
with. AutoNumber should be used only to guaranty a unique value to
identify the record.
 
E

Evi

I believe that in Acc2007, you can't reset the Autonumber field. And that's
not a bad thing. I've got an Archive table where the Autonumber in my real
table has been replaced by a Number field so that i can append to it. But I
have to ensure that my user does not Compact and Repair immediately after
archiving until he has entered one other record.

It sounds as if you need a sequential number field (perhaps an invoice
number). Keep your autonumber as your primary key field - it will chug away
in the background doing no harm at all, but add another field (number) for
your sequential number.
The sequential number is added by code when you use a form to input your
data. It looks up the highest number that was used to date and adds 1 to it.

If you do a search in Google Groups in Access Formscoding for Sequential
Number and DMax you will probably find loads of posts containing
instructions on how to do this. If you cannot follow them, write back.

Evi
 

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