Solved

If statement to turn off input mask

Posted on 2006-11-08
3
269 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
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…
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

758 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now