Mailing List ID numbers

J

jacatts

The highest Mailing List ID number is 145, but the number of Records says
142. Record numbers 94, 95, and 96 have vanished from the database. Where
did they go? What did I do that made them disappear? Can they be retrieved?
 
A

Allen Browne

As soon as you start typing into a new record, Access assigns the next
autonumber. If you abort the entry, it never assigns that number again. That
makes sense, because if someone else started adding another entry before you
finished adding yours, it would need to give them the following number, not
the same one it gave you. Consequently, the AutoNumbers are just unique
numbers. They are not a sequence of numbers.

Similarly, if you did delete number 94, Access does not renumber all the
following numbers down to fill the gap. Therefore there will always be gaps,
and the highest number used so far is never the same as the current number
of records (except in trivial cases.)
 
B

boblarson

This is the problem with people who use Autonumbers for meaningful purposes,
other than as an ID field. If you start a record and then cancel it, the
number is forever gone, if you delete a record then that autonumber is gone
forever.

An Autonumber ONLY guarantees you a UNIQUE number. It does not guarantee
you consecutive numbers.

If you need consecutive numbers create your own numbering using DMax and
assign it at the last possible moment at time of record creation.
--
Bob Larson
Access World Forums Super Moderator
Utter Access VIP
Tutorials at http://www.btabdevelopment.com
If my post was helpful to you, please rate the post.
__________________________________
 
J

jacatts

To Allen Browne and Bob Larsen, thank you for your answers. And thank you for
additional resources on your websites. I'll check them often I'm sure.
Happy New Year.
 
Top