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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress Access Error Msgs

Status
Not open for further replies.

legendv

Technical User
Apr 10, 2002
32
0
0
US
How do you suppress Microsoft Access error messages?
For instance, when user enters date format incorrectly I would like my own msgbox to appear instead of access. But I don't know how to suppress MS A2K's error msg.

Any suggestions?

Thanks
 
To trap errors...

private sub MyProc()

on error goto ErrHandler:

<Code that could raise errors here>

exit sub

ErrHandler:

msgbox &quot;Access is handling this error!&quot;
on error goto 0

End Sub

Alternatively, to supress warnings (e.g. &quot;You are about to run a query that will update 100 rows&quot;)

docmd.setwarning false
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top