Validation with controls

  • Thread starter Thread starter Junior
  • Start date Start date
J

Junior

Want to validate entries for SSN on the form in the ssn control
On the Person Table i use field size 9, format @@@-@@-@@@@

But it is possible for a user to enter characters other than 0-9
I want to use the Validation rule or validation text properties on the
control
to preclude using characters other than 0-9.
Can someone provide an example?
 
It's a little fuzzy in here, but I seem to recall a different "wildcard"
symbol, the "#", to require a digit. Now, you are describing "format", and
you are describing data entry, which would require an input mask rather than
a format.

Which one are you interested in?
 
Hi Jeff-
Sorry about my lack of terminology knowledge or fuzzy description
SSN is a text field in Table Person - and a txtbox on the form is bound to
SSN
Table Person field size is limited to 9 and format is @@@-@@-@@@@
so the SSN displays as "000-00-0000"
but there is no input mask

I want to allow only characters "0"-"9" to be entered in the txtbox
Don't want input mask as users should be able to simply enter 9 numbers(text
digits)
I just want to be sure a user isn't allowed to enter an alpha or other
character - Only digits allowed
BUT i want to do this in the control, not in the table.
Thanks
 
Not sure I understand why you wish to control this in the form, as it is the
underlying data that must be correct. Again, note that format will only
control the display of what is stored, not the value.

Please note, you are trying to control INPUT, rather than DISPLAY. Perhaps
you could use a Validation Rule to check if input data conforms. I'd still
stick with the Input Mask -- by the way, if you use "000-00-0000" (instead
of the # symbols I suggested earlier), you will force the input of 9 digits.
 
Back
Top