I have an autonumber field in a table which is linked to fields in multiple other tables.
These existing numbers cannot be changed without having to change all the corresponding data in the other tables.
I have been testing the database by adding test records to check queries, new pieces of code etc. are working. However, this naturally creates new autonumbers, and after deletion of these test records the database 'remembers' the last false record and assigns new real records with a number which is not consecutive to the previous real record.
I had thought that compacting the database after testing and deleting the test records would reset the autonumber field so that new records would have consecutive numbers, but this does not happen.
Is there any way of resetting the seed for the autonumber to the last existing record after deletion of the test records (for example with code), without going through a long and protracted process of creating duplicate tables, breaking links between tables, writing queries to update all relevant fields in different tables etc. all of which run the risk of introducing errors in the data?
Thanks
These existing numbers cannot be changed without having to change all the corresponding data in the other tables.
I have been testing the database by adding test records to check queries, new pieces of code etc. are working. However, this naturally creates new autonumbers, and after deletion of these test records the database 'remembers' the last false record and assigns new real records with a number which is not consecutive to the previous real record.
I had thought that compacting the database after testing and deleting the test records would reset the autonumber field so that new records would have consecutive numbers, but this does not happen.
Is there any way of resetting the seed for the autonumber to the last existing record after deletion of the test records (for example with code), without going through a long and protracted process of creating duplicate tables, breaking links between tables, writing queries to update all relevant fields in different tables etc. all of which run the risk of introducing errors in the data?
Thanks