L
Leslie Isaacs
Hello All
I have a text field on a form where the value must be either empty (=null)
or it must be exactly 7 alphas all of which must be either "Y" or "N".
Is there an input mask to ensure this, or do I need code? I know I could do
something along the lines of
If Mid([myText],1,1) <>"Y" and If Mid([myText],1,1) <>"N"
or
If Mid([myText],2,1) <>"Y" and If Mid([myText],2,1) <>"N"
etc
Then MsgBox("Invalid entry")
End If
.... but that seems very longwinded. Is there a better way?
Hope someone can help.
Many thanks
Leslie Isaacs
I have a text field on a form where the value must be either empty (=null)
or it must be exactly 7 alphas all of which must be either "Y" or "N".
Is there an input mask to ensure this, or do I need code? I know I could do
something along the lines of
If Mid([myText],1,1) <>"Y" and If Mid([myText],1,1) <>"N"
or
If Mid([myText],2,1) <>"Y" and If Mid([myText],2,1) <>"N"
etc
Then MsgBox("Invalid entry")
End If
.... but that seems very longwinded. Is there a better way?
Hope someone can help.
Many thanks
Leslie Isaacs