AutoNumber Reset

  • Thread starter Thread starter TIML
  • Start date Start date
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
 
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.
 
Back
Top