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 » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Autonumbering problem - keeps incrementing even though deleted row



 
 
Thread Tools Display Modes
  #1  
Old February 24th, 2009, 03:54 PM posted to microsoft.public.access.tablesdbdesign
BP
external usenet poster
 
Posts: 39
Default Autonumbering problem - keeps incrementing even though deleted row

hi,

I have an primary key autonumber field that goes from 1, 2, 3... - 115+
records. I have manually deleted alot of rows till currently left about 45
records. But whenever i add a new row, the number starts from the last 115
number.

I'm not sure what caused this or even if this is normal behavior?
  #2  
Old February 24th, 2009, 03:59 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Autonumbering problem - keeps incrementing even though deleted row

That is normal.
--
KARL DEWEY
Build a little - Test a little


"BP" wrote:

hi,

I have an primary key autonumber field that goes from 1, 2, 3... - 115+
records. I have manually deleted alot of rows till currently left about 45
records. But whenever i add a new row, the number starts from the last 115
number.

I'm not sure what caused this or even if this is normal behavior?

  #3  
Old February 24th, 2009, 04:10 PM posted to microsoft.public.access.tablesdbdesign
BP
external usenet poster
 
Posts: 39
Default Autonumbering problem - keeps incrementing even though deleted

Hello,

Is there anyway to prevent this from happening?
I require the autonumber field number to go in sequence. Now it jumped from
45 to 115.
I could delete off the autonumber field column and re-make 1 but it is a
hassle as I would need to frequently to delete rows manually in the table so
any good recommendations would be helpful.

Thanks!


"KARL DEWEY" wrote:

That is normal.
--
KARL DEWEY
Build a little - Test a little


"BP" wrote:

hi,

I have an primary key autonumber field that goes from 1, 2, 3... - 115+
records. I have manually deleted alot of rows till currently left about 45
records. But whenever i add a new row, the number starts from the last 115
number.

I'm not sure what caused this or even if this is normal behavior?

  #4  
Old February 24th, 2009, 04:46 PM posted to microsoft.public.access.tablesdbdesign
TedMi[_3_]
external usenet poster
 
Posts: 48
Default Autonumbering problem - keeps incrementing even though deleted

Autonumber is not meant to provide unique numbers, not guaranteed to be in
sequence. If you need an ubroken sequence, you must generate your own
numbers, e.g. by adding 1 to Max(yourIDfield).
-TedMi

"BP" wrote in message
...
Hello,

Is there anyway to prevent this from happening?
I require the autonumber field number to go in sequence. Now it jumped
from
45 to 115.
I could delete off the autonumber field column and re-make 1 but it is a
hassle as I would need to frequently to delete rows manually in the table
so
any good recommendations would be helpful.

Thanks!


"KARL DEWEY" wrote:

That is normal.
--
KARL DEWEY
Build a little - Test a little


"BP" wrote:

hi,

I have an primary key autonumber field that goes from 1, 2, 3... -
115+
records. I have manually deleted alot of rows till currently left about
45
records. But whenever i add a new row, the number starts from the last
115
number.

I'm not sure what caused this or even if this is normal behavior?



  #5  
Old February 24th, 2009, 11:41 PM posted to microsoft.public.access.tablesdbdesign
Fred Boer
external usenet poster
 
Posts: 314
Default Autonumbering problem - keeps incrementing even though deleted

....and in case you'd like an example database to suggest a solution, try
he

http://www.rogersaccesslibrary.com/f...26 d96633cec2

--
Fred Boer - Amateur Access Enthusiast
Interests: Library software / Z39.50 / Web Services
Freeware Small Library Application available he
http://www3.sympatico.ca/lornarourke/


"BP" wrote in message
...
Hello,

Is there anyway to prevent this from happening?
I require the autonumber field number to go in sequence. Now it jumped
from
45 to 115.
I could delete off the autonumber field column and re-make 1 but it is a
hassle as I would need to frequently to delete rows manually in the table
so
any good recommendations would be helpful.

Thanks!



  #6  
Old February 25th, 2009, 05:58 AM posted to microsoft.public.access.tablesdbdesign
Jack Cannon
external usenet poster
 
Posts: 151
Default Autonumbering problem - keeps incrementing even though deleted

Here is a URL that addresses your concern.
http://support.microsoft.com/kb/210194

The following is probably the easiest way to accomplish your objective, but
it could result in duplicate numbers in a multi-user environment. If you use
the following you should take appropriate steps to ensure that no one other
than you can create the sequential number in order to avoid the possibility
of duplicate numbers.

Open the properties window of the form and enter the following line of text
into the "Default Value" of the MySeqNum property window.

=Nz(DMax("MySeqNum", "tblMyTable"), 0) + 1

Jack Cannon


"BP" wrote:

Hello,

Is there anyway to prevent this from happening?
I require the autonumber field number to go in sequence. Now it jumped from
45 to 115.
I could delete off the autonumber field column and re-make 1 but it is a
hassle as I would need to frequently to delete rows manually in the table so
any good recommendations would be helpful.

Thanks!


"KARL DEWEY" wrote:

That is normal.
--
KARL DEWEY
Build a little - Test a little


"BP" wrote:

hi,

I have an primary key autonumber field that goes from 1, 2, 3... - 115+
records. I have manually deleted alot of rows till currently left about 45
records. But whenever i add a new row, the number starts from the last 115
number.

I'm not sure what caused this or even if this is normal behavior?

 




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 02:13 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.