V
Van T. Dinh
* Create a one-record Table just to hold the next
InvoiceNumber.
* In the Form_BeforeUpdate Event, check that the Form is
on NewRec. If it is on NewRec, open a Recordset from the
above with lock denying access by other users.
* Retrieve the InvoiceNumber for the current Record.
* Update the one-Record Table to next InvoiceNumber.
* Close the Recordset (and set it to Nothing) to release
the lock.
HTH
Van T. Dinh
MVP (Access)
InvoiceNumber.
* In the Form_BeforeUpdate Event, check that the Form is
on NewRec. If it is on NewRec, open a Recordset from the
above with lock denying access by other users.
* Retrieve the InvoiceNumber for the current Record.
* Update the one-Record Table to next InvoiceNumber.
* Close the Recordset (and set it to Nothing) to release
the lock.
HTH
Van T. Dinh
MVP (Access)