AutoNumber Reset

T

TIML

I need to reset a table's AutoNumber field to 1 everytime the data is
deleted from it. I know that you can use an append query to change the
autonumber field to a number that is greater than what has been used it the
past, but I don't know how to reset it to one. If there is no way to do it,
how would I copy the table and paste it with a new name and then delete the
original table and then rename the copy with the original table name?? (that
is the only way I can get the autonumber to reset to 1).

Tim
 
C

Chris

Deleting all the data, then compacting the database will
also reset your AutoNumber.

Otherwise, you could, either using SQL or DAO/ADO make the
changes in code.

Alter Table TABLENAME Drop FieldName
Alter Table TABLENAME Add FieldName Counter Contraint
MyConst1 Primary Key



Chris.
 

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

AUTONUMBER reset 7
Reset autonumber 1
delete autonumber memory 2
Autonumber fields in MS Access 6
Restarting AutoNumber 5
autonumber reset 4
Access 5
Autonumber without a autonumber field 3

Top