Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000: Override "inappropriate Input Mask" error message?

Status
Not open for further replies.

marcus101

Programmer
Jan 21, 2003
64
0
0
CA
Hello:

Was wondering if anyone has attempted to override, bypass or replace the "inappropriate Input mask" error message that pops up in tables and forms when a user mis-enters information when using a strict input mask (ie: particularly when using "L" characters or "0" numbers, which MUST be entered in order for the input mask to be valid).

Since there is no specific error code per se (at least not one that gets thrown via a general On Error trap) can anyone shed some light on this scenario?

Or is this not possible?

Thanks for any help or thoughts on this one.

marcus101
Access/SQL/XML Developer
Ottawa, Canada
 
Maybe:
[tt]Private Sub Form_Error(DataErr As Integer, Response As Integer)
'Keywords: Custom error input mask violation
'goes in a form module
Const INPUTMASK_VIOLATION = 2279
If DataErr = INPUTMASK_VIOLATION Then
'MsgBox "There was an input mask violation!"
Screen.ActiveControl.Undo
Response = acDataErrContinue
End If
End Sub[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top