Solved

If statement to turn off input mask

Posted on 2006-11-08
3
307 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
[X]
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
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

729 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