Solved

If statement to turn off input mask

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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 …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

776 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