Hello everyone,
I have reviewed a number of threads on the subject of autonumber. It's all been VERY interesting (i.e. thread181-394005) However, after reviewing these I didn't find anything regarding my problem: autonumber is generating new numbers that already exist in the middle of the database. I have tried doing a compact and repair to no avail. As I am unsure how the system keeps track of the last autonumber used I can't explain why this is happening.
Does the system search the existing records looking for used numbers then generates numbers based on gap's or does it go to the last generated number and go from there?
As a test I imported a copy of the table to a blank database and tried adding a new record there. The autonumber picks up by adding 1 to the LAST generated autonumber, that seems to work fine. Then I went back to the original mdb, renamed the original table, then imported the previously exported table back to the original mdb, now it generates numbers correctly. Obviously, something happened during import but I don't know what.
Additionally, the tables have been split away from the program AND the program and initialized tables are being distributed via MODS package wizard therefore I am linking to the tables EVERY time the program starts. This seems to be working fine but I'm not sure that this isn't contributing to the problem.
While exporting and importing may seem to solve MY problem there are other users with there own set of tables that must be experiencing this problem although they may not know it yet. I need to solve this problem and then provide the solution to the user base.
Any ideas would be appreciated.
I read in a post that changing the method of autonumber to 'Random' ensures that the 'system' generates the number. Is that the same as saying that 'Increment'(default) is not system generated?
Additionally, I read the suggestion of MS on how to set the autonumber to a value that it then uses going forward. If I do this it will have to be in code and run every time the program starts. Not terrible but I'm getting concerned about the startup time.
I have reviewed a number of threads on the subject of autonumber. It's all been VERY interesting (i.e. thread181-394005) However, after reviewing these I didn't find anything regarding my problem: autonumber is generating new numbers that already exist in the middle of the database. I have tried doing a compact and repair to no avail. As I am unsure how the system keeps track of the last autonumber used I can't explain why this is happening.
Does the system search the existing records looking for used numbers then generates numbers based on gap's or does it go to the last generated number and go from there?
As a test I imported a copy of the table to a blank database and tried adding a new record there. The autonumber picks up by adding 1 to the LAST generated autonumber, that seems to work fine. Then I went back to the original mdb, renamed the original table, then imported the previously exported table back to the original mdb, now it generates numbers correctly. Obviously, something happened during import but I don't know what.
Additionally, the tables have been split away from the program AND the program and initialized tables are being distributed via MODS package wizard therefore I am linking to the tables EVERY time the program starts. This seems to be working fine but I'm not sure that this isn't contributing to the problem.
While exporting and importing may seem to solve MY problem there are other users with there own set of tables that must be experiencing this problem although they may not know it yet. I need to solve this problem and then provide the solution to the user base.
Any ideas would be appreciated.
I read in a post that changing the method of autonumber to 'Random' ensures that the 'system' generates the number. Is that the same as saying that 'Increment'(default) is not system generated?
Additionally, I read the suggestion of MS on how to set the autonumber to a value that it then uses going forward. If I do this it will have to be in code and run every time the program starts. Not terrible but I'm getting concerned about the startup time.