Append query using DMax() function to increment number field
Posted on 2004-09-24
I have used an append query to update field invoice number for next highest one in table . Search for by no date and then give those invoice numbers .
Problem append Query (Batch invoicing)
UPDATE Invoices SET Invoices.[Invoice Date] = Date$(), Invoices.[Invoice Number] = DMax("[Invoice Number]","[invoices]")+1
WHERE (((Invoices.[Invoice Date]) Is Null));
It does find next number nut numbers all of them same example highest is 1001 it lables all 1002
How do I get it to label 1002,1003 etc