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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validate format in VBA

Status
Not open for further replies.

hpl2001

Programmer
Dec 18, 2001
105
CA
Hello:

I have an access database, with a form field that has the following input mask: !0000\-00000;0;_

When a user eneters a value that does not match I get an error message the requests the above described input format (confusing to user). I would like to capture any error so that I can display a message to show that the format should be 0000-00000. I want to use VBA to test if the current value for the field follows this input mask, but I'm not clear on how to code that. Any thoughts?
 


forum702 for better results in MS Access.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Use the Error event procedure of the Form.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top