bud52
12-16-1999, 04:55 AM
I am trying to change the message that pops up when a user fails to enter data that matches the required "input mask". e.g. An input mask with 09/09/0000;0;" " which will require the user to enter a 4-digit year displays this message "The value you entered isn't appropriate for the input mask '09/09/0000;0;" "' specified for this field."
Any help is appreciated.
Thanks
Jurni
12-23-1999, 08:57 AM
Go to the table design. Click on the appropriate line. At the bottom of the screen, on the "general" tab there is a line for input masks. Highlight whatever is there and push your delete key.
R. Hicks
12-23-1999, 01:57 PM
You can trap the error then attach your own message.
' This changes the Input Mask default message******************
Private Sub Form_Error(DataErr As Integer, Response As Integer)
Const INPUTMASK_VIOLATION = 2279
If DataErr = INPUTMASK_VIOLATION Then
MsgBox "There was an input mask violation!"
Response = acDataErrContinue
End If
End Sub
HTH
RDH
belsha
10-29-2003, 08:45 AM
Several threads address generating a custom error message for the form for things like date. Is there a way to generate a custom error message for a specific field that uses an error mask? For example, the ID number must be 7 digits, using leading zeros if necessary. The input mask is 0000000;0 - I do not want the field to be required (which if it was would enable me to use the validation text). The Access message generated is: The value you entered is not appropriate for the input mask... If I use error trapping for the form, with the code number generated for this, my custom error message displays for date/time fields or any field with a length problem. I would like to write something for just this specific field, like you have entered 6 digits, and you must enter 7, using leading zeros if necessary.