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  

Autonumber lost its sequence.



 
 
Thread Tools Display Modes
  #1  
Old March 30th, 2005, 09:38 AM
fofikos
external usenet poster
 
Posts: n/a
Default Autonumber lost its sequence.

I created a database for a certification authority meaning that all
certificates must have a continuous numbering.

My client reported that today the database skiped two numbers up than it
should; I suspect that the client created the records and deleted them, but
the form does not allow deletion of records! And there is no other way to
input to that table (unless intentionaly).

Any idea what else could cause that?
What can i do to reuse these two numbers?


THANKS
Vasilis


  #2  
Old March 30th, 2005, 10:23 AM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Vasili,

Deletion of records directly in the table is a possibility, though not
necessarily the only one. The important thing here is that, due to the
nature of autonumber, it is not suitable for cases like yours where you
require sequential numbering. Since all data entry is done through a
form, a more appropriate way would be to use a number field instead, and
make use of the Default Value property of the control bound to it on
the form to calculate the next number by means of an expression like:
DMax("[ID_Field]","Tablename") + 1
Note that the control should be disabled (if not hidden) so the user
can't change the number.

HTH,
Nikos

fofikos wrote:
I created a database for a certification authority meaning that all
certificates must have a continuous numbering.

My client reported that today the database skiped two numbers up than it
should; I suspect that the client created the records and deleted them, but
the form does not allow deletion of records! And there is no other way to
input to that table (unless intentionaly).

Any idea what else could cause that?
What can i do to reuse these two numbers?


THANKS
Vasilis


  #3  
Old March 30th, 2005, 02:43 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default

When you *begin* adding a record, Access assigns the next available
autonumber.

If you then press Esc twice, it aborts the entry of the record. But the
number has already been assigned, and it will not be assigned again. This is
a very common scenario.

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

"fofikos" wrote in message
...
I created a database for a certification authority meaning that all
certificates must have a continuous numbering.

My client reported that today the database skiped two numbers up than it
should; I suspect that the client created the records and deleted them,
but the form does not allow deletion of records! And there is no other way
to input to that table (unless intentionaly).

Any idea what else could cause that?
What can i do to reuse these two numbers?


THANKS
Vasilis



 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2000, autonumber fields Zyberg74 General Discussion 3 November 17th, 2004 04:24 PM
how do i keep autonumber in the right sequence Seering Using Forms 1 November 2nd, 2004 10:34 PM
Problem with AutoNumber accessmonk Database Design 2 September 30th, 2004 08:57 PM
Autonumber Ally H. General Discussion 7 August 27th, 2004 04:51 PM
My tables lost their AutoNumber fields Bill Nicholson Database Design 2 July 2nd, 2004 02:20 AM


All times are GMT +1. The time now is 12:52 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.