I am using this now in the afterupdate field of invoicedetails.customerid text field
but still getting same message you must save first
am i still doing something wrong
i change the line
invMax = Nz(DMax("InvoiceNumber", "activeinvoices", "CustomerID = '" & Me.CustomerID & "'"), 0)
to...