Appendix E. Access 2002 and Jet 4 Errors

Access lets you trap some errors that can occur during program execution. By using the error-trapping commands mentioned in Chapter 7, “Handling Your Errors in Access with VBA,” you can anticipate errors and handle them accordingly.

The following table lists both Access 2002 application/VBA errors and Jet 4.0 errors. The error numbers can potentially go up to 32767, with user-definable errors from 30000 on.

The code in Listing E.1 creates the data in the upcoming table.

Example E.1. Storing All Access and Jet Errors to a Table

<LINELENGTH>90</LINELENGTH>
Sub CreateErrorTable() Dim cnn As ADODB.Connection Dim rst As New ADODB.Recordset Dim lngCurr As Long Set cnn = CurrentProject.Connection cnn.Execute "Delete ...

Get F. Scott Barker’s Microsoft Access 2002 Power Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.