MS Access 2010.
I had created a table which included an AutoNumber field, properties "Indexed (No Duplicates)" although not a Key Field as I have three fields set as Key (all indexed/duplicates OK). The database was on a shared network, and accessed by two different people
Had been working fine for some weeks, and I have a habit of using the 'Repair/Compact' tool at regular intervals. There were some 18,000 records on it, with a similar table in another database that was used for training purposes, originally with a similar number of records but reduced to some 12,000 following a clear-out of older records. This Training system was also working fine for some time.
Following problems with entering new records - on both the 'live' and Training systems - I discovered that the internal 'index' that records the last AutoNumber used and hence allocates the next number for a new record had 'lost its memory' and was re-allocating serial numbers already used.
Searching on the Web I discovered that this was not unknown, and downloaded the appropriate code to interrogate the database and reset this 'last used' number. It seemed to work, until the database was closed again and reopened, at which stage it had gone back to an old already-used number.
Therefore created a brand-new database, manually created a duplicate table and imported the old data into it from the existing database, letting the new database and its new table allocate the AutoNumber (the old system's 'AutoNumber' field data was put into a new field). This seemed to work fine, and in testing I could close the database several times and re-open, with the 'last used index number' still being retained, until I ran the 'Repair/Compact' tool again, at which stage the 'last used number' was again lost, and subsequent new records being allocated an already-used ID.
Any thoughts?
Thanks.