mpekarsr
05-06-2009, 05:08 AM
I am using Access 2007 and after entering data on the Datasheet, it suddenly disappears and the next data input is one number greater than the previous. This has occurred to me on 3 occasions. What happened to the data I typed in and where is the missing ID#?:mad:
Guus2005
05-06-2009, 11:56 PM
You are using a form to enter data? y/n
The form is bound to a query? y/n
The query contains a where clause? y/n
The data you enter is not excluded by the above where clause? y/n
The default field settings for new records are not excluded by the above where clause? y/n
If any of the last three questions are answered y, then there might be your problem.
HTH:D
gemma-the-husky
05-07-2009, 02:19 AM
but to go further
autonumbers are issued by access
so if you add a record, you get allocated the next autonumber
if you cancel/undo this add (manually or by code) which appears to be your circumstance, that number is effectively lost.
because of this behaviour it is quite wrong to try to use an autonumber to generate a contiguous sequence - if you need that, you have to manage the sequence manually
The_Doc_Man
05-07-2009, 12:01 PM
The only property of an autonumber that you are guaranteed is that it is a valid, unique number that no other record in that table will use. You are never guaranteed sequential numbering or contiguous numbering.
Search this forum for "Autonumber" as a topic to see a LOT of discussion and traffic on this particular topic.