LOL, I found the mistake!
I had the "exit function" in the wrong place.
vb Code:
'Checks to make sure the user entered a FDID and in the correct format If txtFDID.Text = "" Or txtFDID.Text <> "" Then Dim r As RegExp Dim m As String Set r = New RegExp r.Pattern = "^[A-Z][0-9][0-9][0-9]$" r.IgnoreCase = True m = r.Test(txtFDID.Text) If m = False Then MsgBox "The information that you have entered for the FDID field is not valid or you forgot to make an entry:" & vbCrLf & "1. The FDID is REQUIRED!" & vbCrLf & "2. The FDID must be in the A123 format!" & vbCrLf & "For example: First entry must be a letter (A-Z) followed by" _ & " three numbers (0-9)!", vbOKOnly, "Note" txtFDID.Text = "" txtFDID.SetFocus Exit Function <---to here End If Exit function <--moved this from here End If
Thanks anyway!




Reply With Quote