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

Error trap question

Status
Not open for further replies.

batteam

Programmer
Sep 12, 2003
374
US
I have error trapping code in almost all procedures and modules behind my forms, but sometimes, somewhere, an error will occur that is not captured by code and the MS Access error message is displayed. Is there a way to capture/trap any error that may occur on a form (Access 2000) by setting up some error capture VB code in the form's Form_Load (or Open,etc.) event that will enable me to display my own (less threatening) message to the user, no matter where it occurs?

Thanks for any assistance you can provide.
 
Mammoth task!

Somewhere in the MS Knowledgebase is a listing of all Access error codes and their meanings, some helpful, some not. You could copy the list and insert the error codes into a table, replacing the MS descriptions with your own. In your VB error trapping you could then reference the error code returned to the error table and return your description in a message box.

Lots of luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top