S
Syphonics via AccessMonster.com
I have this statement in my order form.
Before insert function:
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.InvoiceID = Nz(DMax("InvoiceID", "Orders"), 0) + 1
End Sub
This function will increase the invoice number each time I insert an order.
But there will be duplicates when 2 or more stations conicidently insert an
order at the same time.
I required this InvoiceID to be unique, no duplicates. Is there a way to
prevent duplicates?
Before insert function:
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.InvoiceID = Nz(DMax("InvoiceID", "Orders"), 0) + 1
End Sub
This function will increase the invoice number each time I insert an order.
But there will be duplicates when 2 or more stations conicidently insert an
order at the same time.
I required this InvoiceID to be unique, no duplicates. Is there a way to
prevent duplicates?