Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation rule for text box

Status
Not open for further replies.

crisis2007

Technical User
Apr 2, 2007
114
0
0
US
I am trying to limit the input in a text box. It is for event numbers that are supposed to be in the following format: 11-12345. I need the hyphen in the number after the first two digits. There can be 1-5 digits after the hyphen. I just can't find exactly what I am looking for.
 
Disregard this question - I figured it out. I used:

AA"-"aaaaa
in the input mask as well as:

Is Null Or Not Like "*[!0-9-]*"
in the validation rule of the text box. It took care of the problems I had with extra hyphens and letters that users would input.

At least my testing so far using this seems to work.......
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top