techkenny1
Technical User
Hi
On an invoice form I have used this code to generate invoice numbers
Me.InvoiceNumber = Nz(DMax("InvoiceNumber", "Accounts08"), 0) + 1
What I have noticed is that the invoice number does not appear in the table until the invoice is saved.
I need to have 2 people invoicing at the same time, without duplicating the invoice number.
I have tried using this code as follows
While this works and adds the invoice number into the table it skips an invoice number eg:41026 and then 41028.
Without the [blue]save[/blue] command it gives consecutive numbers.
How can I have two people invoicing at the same time so that each invoice runs consectively without duplicating the same invoice number
Many thanks..kp
On an invoice form I have used this code to generate invoice numbers
Me.InvoiceNumber = Nz(DMax("InvoiceNumber", "Accounts08"), 0) + 1
What I have noticed is that the invoice number does not appear in the table until the invoice is saved.
I need to have 2 people invoicing at the same time, without duplicating the invoice number.
I have tried using this code as follows
Code:
Private Sub Form_Current()
Me.InvoiceNumber = Nz(DMax("InvoiceNumber", "Accounts08"), 0) + 1
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
End Sub
While this works and adds the invoice number into the table it skips an invoice number eg:41026 and then 41028.
Without the [blue]save[/blue] command it gives consecutive numbers.
How can I have two people invoicing at the same time so that each invoice runs consectively without duplicating the same invoice number
Many thanks..kp