Losing Auto Numbers

  • Thread starter Thread starter Simon Harris
  • Start date Start date
S

Simon Harris

Hi All,

I have a client who is using an invoicing system I have built for him, all
is going well apart from 1 or two bugs...I am unsure how to solve this one
though, so would appreciate some help if anyone has any ideas.

My client opens a form, which is for creating a new job or order, the
auto-number is assigned as soon as they enter the form. If they then decide
not to complete the job/order (Abandon it) the auto-number ID is still used
in the DB. I guess I want to truncate the table some how (Can you do that in
access?) or undo what ever entering the form has done.

I expect this is a common(ish) problem, hope some one can help.

Kind regards,

Simon.

--
-
* Please reply to group for the benefit of all
* Found the answer to your own question? Post it!
* Get a useful reply to one of your posts?...post an answer to another one
* Search first, post later : http://www.google.co.uk/groups
* Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat!
 
Fatal error. Auto-numbers are designed ONLY to provide unique numbers,
not consecutive numbers. It is done with magic and no one alive understands
the method used, but it is well known that it can't be relied on to provide
consecutive numbers.

If you want consecutive numbers, you will need to write code to do it.
What would be required would depend on the structure of your tables and how
users interact with it.

Note, Access does not actually delete records, including unique numbers
until the database is compacted.
 
Simon,

The behavior of the AutoNumber field you describe is the normal, "as
designed" behavior of the AutoNumber data type. If your application
absolutely must have consecutive numbering, I'd suggest that you do a search
in Google groups using "Access custom numbering" as a criterion.
 
Back
Top