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  

auto number field displaying gaps once records are deleted



 
 
Thread Tools Display Modes
  #1  
Old July 17th, 2009, 04:41 PM posted to microsoft.public.access.gettingstarted
Sam
external usenet poster
 
Posts: 855
Default auto number field displaying gaps once records are deleted

Hi All, Can I reset the auto number increment such that it has no gaps?
For eg, If i delete couple rows the auto numbering is not updated on its own..

it says..
1
2
3
6
9
.......


Please Help

Thanks in Advance
  #2  
Old July 17th, 2009, 05:13 PM posted to microsoft.public.access.gettingstarted
Beetle
external usenet poster
 
Posts: 1,254
Default auto number field displaying gaps once records are deleted

Answered in the general questions group. Please don't
post separately to multiple groups. It makes it harder
for you to find your posts and it duplicates the efforts of
the people who volunteer their time here.

--
_________

Sean Bailey


"sam" wrote:

Hi All, Can I reset the auto number increment such that it has no gaps?
For eg, If i delete couple rows the auto numbering is not updated on its own..

it says..
1
2
3
6
9
......


Please Help

Thanks in Advance

  #3  
Old July 17th, 2009, 05:15 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default auto number field displaying gaps once records are deleted

No, you cannot reset the autonumber so it won't have gaps. Once a number has
been used it is no longer available. If you start to add a record and then
cancel, that number is used up. If you delete a record, the number has been
used and is no longer available.

Autonumber's primary purpose is to generate a unique number for the record
that cannot be duplicated and can be used as a primary key field. It is
rarely appropriate to show that number to a user.

If you need a sequential number with no gaps, you will have to develop some
vba to generate the number. And if you plan on deleting records, your system
will need a way to spot the gaps in the sequence and re-issue the number.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

sam wrote:
Hi All, Can I reset the auto number increment such that it has no gaps?
For eg, If i delete couple rows the auto numbering is not updated on its own..

it says..
1
2
3
6
9
......


Please Help

Thanks in Advance

  #4  
Old July 17th, 2009, 05:16 PM posted to microsoft.public.access.gettingstarted
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default auto number field displaying gaps once records are deleted

No. Autonumbers are only for producing a unique number which is very handy as
a primary key. In fact there are other ways to have gaps besides being
deleted.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"sam" wrote:

Hi All, Can I reset the auto number increment such that it has no gaps?
For eg, If i delete couple rows the auto numbering is not updated on its own..

it says..
1
2
3
6
9
......


Please Help

Thanks in Advance

  #5  
Old July 17th, 2009, 06:09 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default auto number field displaying gaps once records are deleted

Why do you care? Access Autonumbers are generally unfit for human
consumption.

If you need a guaranteed sequential identifier, you'll have to 'roll your
own'...

Regards

Jeff Boyce
Microsoft Office/Access MVP

"sam" wrote in message
...
Hi All, Can I reset the auto number increment such that it has no gaps?
For eg, If i delete couple rows the auto numbering is not updated on its
own..

it says..
1
2
3
6
9
......


Please Help

Thanks in Advance



 




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 11:25 PM.


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