Code to advance records
This cod
Private Sub Form_Current()
If Me.NEWRECORD Then
On Error Resume Next
Me.NMMI_NUM = "A" & pad_zeros(Val(Mid$(DMax("[NMMI_NUM]", "INV_NMPHY"), 2)) + 1, "right", 6)
End If
End Sube is in the On Current Event of the form.