Peter,
There is no need to copy the structure to a new table, if all existing data
will be deleted from the table. In fact, doing so should require an
additional step that you didn't mention: that would be to delete any existing
relationships before you deleted the original table, and then re-establish
them when you rename the new table. If this is not a requirement, then you
likely have not established relationships between the tables. Relationships
between tables serve a very important purpose, namely referential integrity.
If all records have been deleted, then the autonumber will reset when you
compact the database using Tools > Database Utilities > Compact and repair
database.
Tom
______________________________________
:
As mentioned, Autonumber is to guarantee uniqueness, not sequential.
However, if you do the following steps sequentially without opening any
other queries / forms / reports / etc .....
If you are looking to reset a table after testing, and the table will be
empty when delivering to end user, try copying the original table (eg
tbl_Employee) without data to another name (eg tbl_EmployeeNew), then delete
the old table (tbl_Employee), then rename the copied table back to the
original (tbl_EmployeeNew to tbl_Employee).
When this table is then accessed for the first time, the AutoNumber will be
reset. All the queries, forms, reports, etc will be none the wiser as the
same table with the same structure and same formatting is available.
Cheers
______________________________________
:
Dear Arvin,
Thank you for your advice.
On the other hand, I have entered some testing data in the
database. Before deliver to end user, what is the best
way to remove all testing data ?