I have a field on a form which looks like a number but is actually a text field and has to stay that way. I'm trying to increment that "number" by "1" if the form is on a new record.
Here's my code which is not working.
If Me.NewRecord Then
Me.txtLastInvoiceID = DMax("[PO INV Invoice ID]", "PO Invoice")
Me.txtLastInvoiceN = CInt(Me.txtLastInvoiceID)
Me.txtPOINVInvoiceID = Me.txtLastInvoiceN + 1
Me.txtLastInvoiceID is the last invoice number which is really a text field that looks like a number
Me.txtLastInvoiceN is my attempt to convert it to a real number
Me.txtPOINVInvoiceID is my attempt to increment Me.txtLastInvoiceN by "1"