Input Value error message

Design by Sue

Registered User.
Local time
Today, 05:19
Joined
Jul 16, 2010
Messages
816
On my form the "procedure" field has an input mask of >L>L>L"-"000"-v"00" so an example of the input would be DSS-012-v00. It works fine unless you mistype and get the error message "the value you entered isn't appropriate for the input mask..." I have found how to change this message box to read better and I can almost live with the behavior when one makes an error and the box appears. The bigger issue is I am trying to put a clear button on the form to clear out all fields, but I can't for the life of me figure how to stop this message from popping up. When it does it prevents the clear button from taking effect and the user is locked on the form and has to correct the format of the field to clear the form - or for that matter do anything else. Any suggestions?

Thanks
Sue
 
If you are just trying to clear the procedure field , You could try entering the following in the "On error" of the forms property .Event Procedure Me.NameOfField = "".
This is acivated when you click out of the field with the Input mask error and you can then re-type the correct format . If you require the focus to be put back to the error field you could do that .Hope I have understood what you are trying to achieve

The main problem with this is that if you have an error on another field , your Procdure Field be blanked.
This is a start and hopefully some one with more understanding can solve that problem .
 
Last edited:
I just tried all version of = "", = Null, and even .value= null and "" and it doesn't work. I tried it in all possible placed in the on error code and in the clear button click. Access keeps hanging on the error message that the input mask has been violated and unless the user actually backspaces to the beginning of the field he is locked onto the form.
 
One more time was the charm! I used If Me.Dirty Then Me.Undo instead of your suggestion. I put it in the on error code that I created that changes the Access message box for a more friendly one.

Thanks - you did hope solve the problem!
 
Thanks for you reply. I too have increase my knowledge .
 

Users who are viewing this thread

Back
Top Bottom