Make text box mandatory and numbers only

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

Guest

In Office 2003, I have a text box control on a form. I want to restrict this
text box to numbers only from 1 to 20 digits in length and I want to make
this text box mandatory for completion...

How can I do this? Thanks.
 
Before I get into an explanation, is this a question about Microsoft Access?
I ask because people are misdirected from the Microsoft web site with some
frequency, and you have only specified Office 2003, not a specific program
within that suite.
The simplest way in Access is to make the table field to which the control
is bound a required field, and to limit its length (assuming it is a text
field) to 20. You can add your own validation rule and message, if you
wish.
Another way is to use the form's After Update event to examine the text box,
and to produce a message if it doesn't pass muster.
 
Oops. I forgot that you specified numbers. I still think it needs to be a
text field, but you could use an input mask (see Help for more information)
to limit it to numeric characters.
 

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

Back
Top