input mask for controls

  • 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.
 
Hi,
The error is from the form's OnError event and the number is 2279.
You can trap this error and display a custom message if you want,
but I don't think you'll be able to set the focus to another control
while the data is invalid.
 
Back
Top