Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

If statement to turn off input mask

Posted on 2006-11-08
3
295 Views
Last Modified: 2006-11-18
Is it possible to turn off an input mask if textbox value equals something? Or better yet, apply a different mask.
Your input and code example is much appreciated
0
Comment
Question by:zubin6220
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
Simon Ball earned 100 total points
ID: 17896369


i made a form, created a textbox with a date mask, then copied out the input mask string and pu it into an if.

click the button alternates between masked and not masked

Private Sub Command2_Click()
If Text0.InputMask = "" Then
Text0.InputMask = "00/00/0000;0;_"
Else
Text0.InputMask = ""
End If
End Sub

which event did you have in mind to trigger the check?

somehting like text0_OnEnter() might be applicable for your needs.
0
 

Author Comment

by:zubin6220
ID: 17896941
Just what I needed, Thanks
0
 
LVL 15

Expert Comment

by:Simon Ball
ID: 17897165
no problem.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question