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

Defining Input masks

Status
Not open for further replies.

njwcad

Technical User
Oct 16, 2002
156
GB
Can anyone help

I would like to define different input masks in a subform text box but based on selection from a combo box on my main form so, for example;

If main form combo box = A then input mask on subform text box = ***space**
If main form combox box =B then input mask on aubform text box = **/***/**

Is there any way to achieve this

Many thanks
 
Have you tried to set the InputMask property in the AfterUpdate event procedure of the combo ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I'll give that a go, many thanks
 
PHV

Thanks for earlier help. However I'm stuck so I'll elaborate

I'll call Combo box on main form "Building Selector" and the text box on sub-form "Enter" so my non-techy version of VBA code would read

If "Building selector" = A then "Enter" input mask = ***Space**
If "Building selector" = B then "Enter" input mask = **/***/**

What would the code look like for this

Thanks again in advance
Njwcad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top