ThomasAJ said:
Thanks Dirk that's great.
Can I change the default error message that Accees issues.
It is very user unfriendly. "The value you entered....mask
'0000'...etc".
Thanks Dirk that's great.
Can I change the default error message that Accees issues.
It is very user unfriendly. "The value you entered....mask
'0000'...etc".
Unfortunately, you can't control that at the level of the control
itself. If you use an input mask, the only way I know of to override
the error message is to catch it in the form's Error event, using an
event procedure similar to this:
'----- start of code -----
Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 2279 Then
MsgBox _
"Please enter 6 digits.", _
vbExclamation, _
"Invalid Entry"
Response = acDataErrContinue
End If
End Sub
'----- end of code -----
You might need to modify the above code to check the form's
ActiveControl property to see which specific control raised the error
and display an appropriate error message accordingly.