input mask

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!
 
J

Jeff L

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.
 
D

dd

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!
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top