Text Box Validation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Reading some of the questions/answers here I found something simple I wanted
to use. It is a validation for a “text†box (I think) but when I use it I
get a validation error. I have a text box I’m using to get a number from the
user. In the validation Rule I used what I found here (Not Like
"*[!A-Za-z]*"). My thinking is/was that this would only accept numbers (0-9)
is that correct? I’m also using an input mask (9999;;). Can this only be
used with an "input Box"?
 
William,

I take it this is an unbound textbox? If you set the Format property of
the textbox to General Number, you will not be able to enter a letter.
Otherwise, you can use a Validation Rule like...
Like "#"
 
williamr said:
Reading some of the questions/answers here I found something simple I wanted
to use. It is a validation for a “text” box (I think) but when I use it I
get a validation error. I have a text box I’m using to get a number from the
user. In the validation Rule I used what I found here (Not Like
"*[!A-Za-z]*"). My thinking is/was that this would only accept numbers (0-9)
is that correct? I’m also using an input mask (9999;;). Can this only be
used with an "input Box"?


Use the Format property is rather subtle, but simple.

If your numbers are integers, then the validation rule you
want is:
Not Like "*[!0-9]*"
 
Back
Top