Guys, I have a table called Order one of the fields is called [InvoiceID].
I have a button in a form that auto-generates a sequential Invoice number, by looking up the highest value and +1. I did this via a macro...
Set Value
Item = [InvoiceID]
Exp. = DMax("[InvoiceID]","Order")+1
But I periodically see duplicate invoice number that I need to reassign a new invoice number for and I'm sure this is not the best way to carry out this operation.
my database is split and I assume that something is not refreshing or buttons are being pressed at the same time.
can someone give me some advice on how to best handle this issue?
I have a button in a form that auto-generates a sequential Invoice number, by looking up the highest value and +1. I did this via a macro...
Set Value
Item = [InvoiceID]
Exp. = DMax("[InvoiceID]","Order")+1
But I periodically see duplicate invoice number that I need to reassign a new invoice number for and I'm sure this is not the best way to carry out this operation.
my database is split and I assume that something is not refreshing or buttons are being pressed at the same time.
can someone give me some advice on how to best handle this issue?