Re: Help:creating a new invoice?
- From: "paii, Ron" <paii@xxxxxxxxxxxxxx>
- Date: Thu, 3 Nov 2005 11:28:45 -0600
"Bernard Peek" <bap@xxxxxxxxxx> wrote in message
news:YWHnuYWOpiaDFwk9@xxxxxxxxxxxxx
> In message <1131030203.356943.202700@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
> "NomoreSpam4Me@xxxxxxxxxxx" <ugo_lavoie@xxxxxxxxxxx> writes
> >and on my form i have a Save button and a Back tu main menu button.
> >
> >
> >even if i dont save it the autonumber goes up by 1 each time.
>
> One way to handle this is to search the invoice table for the largest
> invoice number, add one to it and then use this as the next invoice
> number. If it is a large table this could be slow.
>
> Another approach is to use a table that has one row and one field. When
> you create an invoice you:
>
> 1. read the number stored there
> 2. add one to it
> 3. store the new number, overwriting the old one
> 4. create the invoice record using the new number
>
> The order that you do things can be important. If the process is
> interrupted or fails part way it is better to have a gap in the sequence
> than to have two invoices with the same number.
>
>
>
>
> --
> Bernard Peek
> London, UK. DBA, Manager, Trainer & Author.
>
Dmax would search a large table quickly if Invoice number is indexed.
Invoice number could not be duplicated if Invoice number is the primary key.
You would need to check that the append query succeeded before opening to
the new invoice. A 2nd user may grab the next number just before the 1st,
causing a key violation in the append query.
.
- References:
- Help:creating a new invoice?
- From: NomoreSpam4Me@xxxxxxxxxxx
- Re: Help:creating a new invoice?
- From: paii, Ron
- Re: Help:creating a new invoice?
- From: NomoreSpam4Me@xxxxxxxxxxx
- Re: Help:creating a new invoice?
- From: paii, Ron
- Re: Help:creating a new invoice?
- From: NomoreSpam4Me@xxxxxxxxxxx
- Re: Help:creating a new invoice?
- From: Bernard Peek
- Re: Help:creating a new invoice?
- From: NomoreSpam4Me@xxxxxxxxxxx
- Re: Help:creating a new invoice?
- From: Bernard Peek
- Help:creating a new invoice?
- Prev by Date: Re: Conversion Access MDB to ADP & MSDE 2000
- Next by Date: Re: Combo Box "Not In List" VBA code to Add item to table
- Previous by thread: Re: Help:creating a new invoice?
- Next by thread: Re: Help:creating a new invoice?
- Index(es):
Relevant Pages
|