I finally found a way to replicate a customer code on the detail lines of an Invoice slip/receipt from a Supplier (say Home Depot).
I used the DLAST to get the customer to replicate from the prior line of the Detail table.
However, when I want to create a brand NEW SLIP and I am in the header (with the blank subform detail displayed below), I get the runtime error 3075 "syntax error (missing operator) in query expression '[recordid]='.
Recordid is the same named linking field of the Order Header to the Order Detail.
My Code in the Form_Current of the Detail subform is:
If Me.NewRecord Then
Customer = DLast("customer", "supplierinvoicedtl", "[recordid] = " & Me.RecordID)
I used the DLAST to get the customer to replicate from the prior line of the Detail table.
However, when I want to create a brand NEW SLIP and I am in the header (with the blank subform detail displayed below), I get the runtime error 3075 "syntax error (missing operator) in query expression '[recordid]='.
Recordid is the same named linking field of the Order Header to the Order Detail.
My Code in the Form_Current of the Detail subform is:
If Me.NewRecord Then
Customer = DLast("customer", "supplierinvoicedtl", "[recordid] = " & Me.RecordID)