PC Review


Reply
Thread Tools Rate Thread

autonumber data type field is skipping numbers

 
 
Remi
Guest
Posts: n/a
 
      5th Oct 2009
Not sure why this happened all of a sudden, but my autonumbering field is
skipping numbers. Normally the numbers are generated in integers of one. But
the field skipped from record number 6449 to 6900.
 
Reply With Quote
 
 
 
 
Jerry Whittle
Guest
Posts: n/a
 
      5th Oct 2009
It can happen. The only thing that an autonumber does is create a new, unique
number if it is also the Primary Key field. It is not guaranteed to be
sequential and often is not. In fact it is very easy to 'burn' an autonumber
by opening up a new record, but not saving it. Just opening up a form in add
mode, for example, burns an autonumber and creates a gap in the numbering.

If you MUST have sequential numbers, you need to do a DMax of that field and
insert it while saving the record in a form. Even this can be a problem if
multiple users are inserting records at the same time.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Remi" wrote:

> Not sure why this happened all of a sudden, but my autonumbering field is
> skipping numbers. Normally the numbers are generated in integers of one. But
> the field skipped from record number 6449 to 6900.

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      5th Oct 2009
On Mon, 5 Oct 2009 09:58:14 -0700, Remi <(E-Mail Removed)>
wrote:

>Not sure why this happened all of a sudden, but my autonumbering field is
>skipping numbers. Normally the numbers are generated in integers of one. But
>the field skipped from record number 6449 to 6900.


That's normal behavior. I'm guessing that you ran an Append query to add data
to the table; that will often leave a large gap like this.

An Autonumber has one purpose, and one purpose ONLY: to provide a meaningless
unique key. They're not guaranteed to be sequential, or free of gaps; they can
even become random (if you Replicate the database, say), giving you 224014225
followed by -312255618 followed by 824512436. Therefore Autonumbers should be
kept "under the hood", concealed from user view, so users won't be tempted to
assign them a meaning which they will not support.
--

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I keep the AutoNumber from skipping numbers? =?Utf-8?B?S2V2aW4=?= Microsoft Access 3 30th Mar 2006 07:50 PM
Autonumber skipping numbers =?Utf-8?B?d29vZGxhbmRwZWFybA==?= Microsoft Access 2 21st Dec 2005 05:07 PM
Autonumber skipping numbers =?Utf-8?B?VA==?= Microsoft Access Database Table Design 3 21st Jul 2005 06:15 PM
insert numbers / records in and autonumber data type =?Utf-8?B?bXdkbWFuamc=?= Microsoft Access Getting Started 1 5th Jan 2005 08:48 PM
Autonumber field skipping Marva Frederick Microsoft Access Database Table Design 1 15th Sep 2003 04:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:49 PM.