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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |