Can I Use My Own ErrorLevel Message?

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
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
 
Back
Top