Mailing List ID numbers

  • Follow


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?
0
Reply Utf 12/27/2007 11:41:01 PM

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.)

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jacatts" <jacatts@discussions.microsoft.com> wrote in message
news:87D727F8-B985-42EE-9B54-ED345A4E855E@microsoft.com...
> 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? 

0
Reply Allen 12/28/2007 12:07:20 AM


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.
__________________________________


"jacatts" wrote:

> 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?
0
Reply Utf 12/28/2007 12:17:02 AM

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.

"jacatts" wrote:

> 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?
0
Reply Utf 12/30/2007 3:19:00 PM

3 Replies
268 Views

(page loaded in 0.09 seconds)

Similiar Articles:
















7/24/2012 5:44:37 PM


Reply: