Search code examples
databasems-access-2007overflowcontainersautonumber

MS Access AutoNumber on Import


Just curious, when I imported data from a spreadsheet with 519 lines into an empty table, why did my autonumber keys start at 56,557,618? How big can this get? I don't want to end up running out of digits for my primary key field as I didn't even start on the project and I expect to be dumping spreadsheets in quite regularly.


Solution

  • Access remembers the last ID it gave out even on an empty table. To reset the autonumber you have to compact/repair the database after emptying the table

    Also the autonumber is a long integer which in Access can go up to 2,147,483,647