Solved

input mask from VBA

Posted on 2016-09-22
4
11 Views
Last Modified: 2016-09-22
Hello I am trying to figure out how to do an input mask in vba,

me.txtzip= 00000;0
0
Comment
Question by:Ernest Grogg
  • 2
  • 2
4 Comments
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
Comment Utility
You have to reference the property name to set it.  And you probably have to enclose the string in quotes.

Try

me.txtzip.InputMask = " 00000;0"

Keep in mind that if you distribute as an .accde or .mde, you CANNOT make changes to forms or reports on the fly like this.
0
 

Author Comment

by:Ernest Grogg
Comment Utility
I do do that...

so an if/then statement won't work?
0
 

Author Comment

by:Ernest Grogg
Comment Utility
it does seem to work using the if/then on another field for after update event..

thanks
0
 
LVL 34

Expert Comment

by:PatHartman
Comment Utility
Form/Control properties fall into two categories.  Some can be set and saved without putting the form into design view and others cannot.  This property must be in the first category if it works in an .accde.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
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…

772 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

11 Experts available now in Live!

Get 1:1 Help Now