A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

values in the AutoNumber field are not sequential, why?



 
 
Thread Tools Display Modes
  #1  
Old April 3rd, 2010, 12:49 AM posted to microsoft.public.access.gettingstarted
jeffhill
external usenet poster
 
Posts: 2
Default values in the AutoNumber field are not sequential, why?

While entering records into database, I entered the same record two times. I
deleted the record with the duplicate information and then added a new
record. Now the values in the AutoNumber field are not sequential. How can
this be?
Ads
  #2  
Old April 3rd, 2010, 01:08 AM posted to microsoft.public.access.gettingstarted
Steve[_77_]
external usenet poster
 
Posts: 1,017
Default values in the AutoNumber field are not sequential, why?

At the first data entry keystroke of a new record, Access assigns the
autonumber which is the highest existing autonumber +1. Access never goes
back and trys to assign a missing autonumber. When you delete a record,
Access deletes the assigned autonumber and that number is gone forever never
to be reused.

Steve



"jeffhill" wrote in message
...
While entering records into database, I entered the same record two times.
I
deleted the record with the duplicate information and then added a new
record. Now the values in the AutoNumber field are not sequential. How can
this be?



  #3  
Old April 3rd, 2010, 01:24 AM posted to microsoft.public.access.gettingstarted
Richard
external usenet poster
 
Posts: 1,419
Default values in the AutoNumber field are not sequential, why?

Auto numbers are meant to increment, but not necessarily are sequential.

Richard

"jeffhill" wrote:

While entering records into database, I entered the same record two times. I
deleted the record with the duplicate information and then added a new
record. Now the values in the AutoNumber field are not sequential. How can
this be?

  #4  
Old April 3rd, 2010, 01:25 AM posted to microsoft.public.access.gettingstarted
fredg
external usenet poster
 
Posts: 4,386
Default values in the AutoNumber field are not sequential, why?

On Fri, 2 Apr 2010 16:49:01 -0700, jeffhill wrote:

While entering records into database, I entered the same record two times. I
deleted the record with the duplicate information and then added a new
record. Now the values in the AutoNumber field are not sequential. How can
this be?


That's the way AutoNumbers work. Once a number is assigned to a new
record, if you delete that record that number is not re-used. Even
without deleting a record, AutoNumbers are only required to be unique,
not sequential, and gaps can occur.
If, for some reason, you need to have a sequential number, you'll have
to create your own system. But again, once you delete a record, let's
say record #54 out of a sequence of 1 to 100, you will still have a
missing number.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #5  
Old April 3rd, 2010, 06:26 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default values in the AutoNumber field are not sequential, why?

In addition to what everyone else has told you, why does it matter?

The only reason for an AutoNumber field is to provide a (practically
guaranteed) unique value that can be used as a primary key. 231, 233, 234
serves that need just as well as 1, 2, 3. If the value of the AutoNumber
field matters to you, you probably shouldn't be using an AutoNumber field.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"jeffhill" wrote in message
...
While entering records into database, I entered the same record two times.
I
deleted the record with the duplicate information and then added a new
record. Now the values in the AutoNumber field are not sequential. How can
this be?



  #6  
Old April 3rd, 2010, 10:58 PM posted to microsoft.public.access.gettingstarted
David W. Fenton
external usenet poster
 
Posts: 3,373
Default values in the AutoNumber field are not sequential, why?

=?Utf-8?B?UmljaGFyZA==?= wrote
in news
Auto numbers are meant to increment, but not necessarily are
sequential.


Long integer Autonumbers can be sequential or random. They are
sequential by default. They can also be "ReplicationID" instead of
long integer, in which case they are neither sequential nor random.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:07 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.