Kevin said:
I have a table with an autonumber key. At the end of May 9th, the
last key was 13,337. At the beginning of the next day, the first key
was 866,199,597.
What might possibly have caused this, and how can I prevent it in the
future?
Kevin
In the newer Jet versions (Access 2000 and higher) there were some early
problems with AutoNumber that sometimes caused the seed number to change.
Worse than your situation was when the seed value would be reset to a range
that was already used and then duplicate key errors would result. Later
service packs dealt with the duplicate problem but I believe that MS still
only guarantees "Uniqueness" for new AutoNumbers. There are apparently
still sitiuations that cause the big jumps that you have seen.
Now the standard caveat is "If you care about the value in any way other
than uniqueness, then don't use an AutoNumber". Beyond the issues mentioned
above there have always been completely normal activities in Access that
would create gaps in an AutoNumber sequence. For example if you create a
Append query and cancel at the prompt...
"You are about to append 5000 records..."
....the 5000 AutoNumber positions that the query was going to use are already
consumed by the time that prompt is displayed. That being that case your
jump could theoretically have been caused by something normal like this.
It's just that a jump that severe is more likely to be from something
not-quite-right.