• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 23
  • Last Modified:

input mask from VBA

Hello I am trying to figure out how to do an input mask in vba,

me.txtzip= 00000;0
0
Ernest Grogg
Asked:
Ernest Grogg
  • 2
  • 2
1 Solution
 
PatHartmanCommented:
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
 
Ernest GroggAuthor Commented:
I do do that...

so an if/then statement won't work?
0
 
Ernest GroggAuthor Commented:
it does seem to work using the if/then on another field for after update event..

thanks
0
 
PatHartmanCommented:
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now