input mask for text box

  • Thread starter Thread starter rocco
  • Start date Start date
R

rocco

Hello,
i have decided an input mask for a text box. The input
mask is 00\-00\-00\-00;0;_
I have also setted the max size for the field to 11
characters.
Now i have also written code to drive the user whenever
he leaves the control having inserted less then 11
characters. This code (i think) should be driven by the
BeforeUpdate event. But I'm not able to avoid the default
message from access saying that "the value you entered
isn't appropriate for the input mask... specified for the
field". It seems to me that this msg is driven by some
other event that happens before the BeforeUpdate (i have
tested it using the changing in the caption of al label),
but which event??!!
How can i avoid any messages from access?
Thanks anyone can help.
 
Well,

I think if you want to check both the length and the
format, you'll need to remove the input mask from the
text box and do everything in code.

ie in your BeforeUpdate Event, check the format of the
text in the same as the InputMask does. You can do this
using the Eval function. It should then be simple to
check the Length.

Hope this helps.

Let me know how you get on, or if you need some help
getting the Eval function to work like your input mask.


Damien
 
Back
Top