'Does the VIN conform to code39? sPattern = "*[!0-9A-Z./+$%- ]*" If (Me.VendorItemNumber) Like sPattern Then 'NOT WITHIN CODE39 SYMBOLOGY MsgBox "You have entered an INVALID CHARACTER in this field." & vbCrLf & "Vendor Item Numbers must conform to Code39 symbology.", vbCritical, "Invalid Character!" Cancel = True Exit Sub End If
From novice to tech pro — start learning today.