input mask

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

Guest

I have a textbox on my form called TIN - which is a numeric field that I want
to restrict the data entry to 9 digits. How can I do this if input masks are
only available to text and date formats? Is the only solution to change the
data type at the table level to text? (Even though this truly is a numeric
field)

Thanks!
 
Put 999999999 in the input mask. That will allow you to put any number
of digits in the mask, up to 9 and will not accept text.
 
Lori,

Try entering
#########
in the input mask field in table design

Regards
D Dawson

I have a textbox on my form called TIN - which is a numeric field that I
want
to restrict the data entry to 9 digits. How can I do this if input masks
are
only available to text and date formats? Is the only solution to change the
data type at the table level to text? (Even though this truly is a numeric
field)

Thanks!
 
First, you can use input masks on numeric data.
Second, text boxes do not have a data type. Only the fields bound to them
have data types, so it is possible to put a value in a text box the bound
field would choak on.
I can't tell from your post whether 9 digits are required or 0 to nine
digits are allowed.
If you require all 9 digits the mask would be
000000000
If from 0 to 9 are allowed,
999999999

If at least one digit is required, you will need to use the control's Before
Update event to see if anything has been entered.
If at least one number is required
 
Back
Top