Hello all!
Pulling my hair out, I need to create a sequential number to order payments the way they are entered, long story. My table is ScheduleT (part of an amortization app) both LoanID and PaymentNumber are numeric fields, my code:
Code:
Me.Sequence = Nz(DMax("[Sequence]", "schedulet", "LoanID=" & Forms!LoanF!LoanID), 0) And ("paymentnumber = " & Forms![LoanF]![ScheduleF].Form![PaymentNumber]) + 1
If I remove the second criteria it works fine, except it numbers all of the remaining payments, which I don't want. Does anyone see a glaring error with my quotes or something? I'm getting "type mismatch" with the whole line highlighted.
Thanks in advance!