Re: Generate my own autonumber?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have used a technique based on an example that can be found here:
http://www.rogersaccesslibrary.com/download3.asp?SampleName=AutonumberProblem.mdb
I don't know if there is an advantage to using the code in the link John
provided. I am offering this link simply as a suggestion that has worked
for me. Note that if you don't need for the user to see the number when the
record is being created, holding off running the code until the form's
Before Update event will minimize the likelihood of an error because of a
duplicate value. From another angle, running the code after the first field
is completed (or after the first character is typed in a new record) will
similarly minimize the chance of an error event. Roger's example includes a
provision for when two users are entering a record at the same time, but the
fewer error events you need to run the better, I would think.

"Alec M1BNK" <AlecM1BNK@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D47E0894-7B35-420C-AFA7-3FCB17553354@xxxxxxxxxxxxxxxx
How is the question. i need to create an auto incrementing number for each
successive record, but one which will maintain the sequence infallibly
with
no gaps.

Before anyone asks, here's the why. Our accounts manager is unhappy becase
the autoinvoicing system I have implemented inside an access database,
uses
the autonumber record ID from the table of invoice data to generate an
invoice reference number. As we all know, any database using autonumber
aquires gaps, missing numbers from the sequence, more users = more
mistakes =
more gaps. Apparently the auditors might think there is something fishy
going
on if the invoice numbers are not in perfect sequence.

Alec


.



Relevant Pages

  • Re: Generate my own autonumber?
    ... no gaps. ... the autonumber record ID from the table of invoice data to generate an ... invoice reference number. ... aquires gaps, missing numbers from the sequence, more users = more mistakes = ...
    (microsoft.public.access.tablesdbdesign)
  • Re: How to generate unique document number ?
    ... For example: Invoice Number. ... There is no such thing as a method that will guarantee no gaps unless ... I would suggest you use a sequence and capture in an exception ...
    (comp.databases.oracle.server)
  • Re: How to generate unique document number ?
    ... For example: Invoice Number. ... Depends on your definition of "no gaps", ... you use a sequence, and autonomously store that in a table. ... Connor McDonald ...
    (comp.databases.oracle.server)
  • Re: Please help with no-gap autoincrement field
    ... MySQL has a built-in autoincrement feature ORACLE doesn't seem to. ... Invoice numbers and documents that must be legally accounted for should ... as the source of the key rather than a sequence. ... You can since gaps normally do ...
    (comp.databases.oracle.misc)
  • Re: Sean Pitman: definitions wanted
    ... but are claiming and asserting without evidence that this ... gaps) is the only possible mechanism for evolution. ... *regardless* of the size of the sequence or the number of amino acids ...
    (talk.origins)