Microsoft Office 2000/Visual Basic Programmer's Guide |
You can't handle an error until you know something about it. Where you get information about an error depends on what caused it. The two main sources of information about errors are the VBA Err object and the ActiveX Data Objects (ADO) Error object. The VBA Err object provides information about VBA errors. The ADO Error object and Errors collection provide information about data-provider errors that occur when ADO objects are being used to access data. Errors that occur in ADO itself, as opposed to the data provider, are reported to the VBA Err object.