Can I Use My Own ErrorLevel Message?

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
D

Dave Elliott

Can I replace this with my own error message?
MsgBox Err.Description
 
Yes. Generally, you trap for specific error numbers and leave the MsgBox
Err.Description for any other cases. Like this:

If Err.Number = 3265 Then '*** if the error is the query is missing
MsgBox "There is no such query."
Resume Exit_cmdRunQuery_Click
Else
MsgBox Err.Description '*** write out the error and exit the
sub
Resume Exit_cmdRunQuery_Click
End If

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top