?
Solved

If statement to turn off input mask

Posted on 2006-11-08
3
Medium Priority
?
311 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 400 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

777 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