T
TRob
Access '97
I have a form with 9 fields that needs to be checked for
invalid characters before the record can be saved. I've
been using the "If..Then" to return a message box if one
of the characters is found in any one of the 9 fields. It
is working fine, but I have just been given an additional
19 characters to check for.
Is there an easy way to add the additional 19 characters I
want to check for? Here is a sample of the original code
I have set for each of the 9 fields:
-------------------------------------------
If Me.DeptCode.Value Like "*,*" Then
MsgBox "The Department Code contains a comma." _
& Chr(10) & "Please remove the comma and save the PO
again", vbCritical, "INVALID CHARACTER ALERT"
End
End If
I have a form with 9 fields that needs to be checked for
invalid characters before the record can be saved. I've
been using the "If..Then" to return a message box if one
of the characters is found in any one of the 9 fields. It
is working fine, but I have just been given an additional
19 characters to check for.
Is there an easy way to add the additional 19 characters I
want to check for? Here is a sample of the original code
I have set for each of the 9 fields:
-------------------------------------------
If Me.DeptCode.Value Like "*,*" Then
MsgBox "The Department Code contains a comma." _
& Chr(10) & "Please remove the comma and save the PO
again", vbCritical, "INVALID CHARACTER ALERT"
End
End If