J
jim
My client does not want invoice number larger than 4 positions and it's
nearing "9999" so I wrote this routine (the 8568 represents the first number
in the file):
If NewRecord Then
If DMax("InvoiceID", "tblInvoicesBrad") = "9999" Then
Me.InvoiceID = 101
Else
Me.InvoiceID = DMax("InvoiceID", "tblInvoicesBrad", "InvoiceID"
< "8568") + 1
End If
end if
After looking at it though I realize DMax will always be "9999" and take the
first if and make Me.InvoiceID = 101. What is the best way to write routine
so that it will add 1 to the largest number under 8568 after the one time
"9999" to "101"?
TIA
nearing "9999" so I wrote this routine (the 8568 represents the first number
in the file):
If NewRecord Then
If DMax("InvoiceID", "tblInvoicesBrad") = "9999" Then
Me.InvoiceID = 101
Else
Me.InvoiceID = DMax("InvoiceID", "tblInvoicesBrad", "InvoiceID"
< "8568") + 1
End If
end if
After looking at it though I realize DMax will always be "9999" and take the
first if and make Me.InvoiceID = 101. What is the best way to write routine
so that it will add 1 to the largest number under 8568 after the one time
"9999" to "101"?
TIA