TRACKING ERRORS BY USING A CUSTOM ERROR LOG

One thing that users have a hard time doing is remembering what they were doing when an error occurred. By creating an error log, you can track errors as they happen and program to deal with them the next time around.

Before creating an error log, you need to set up a few constants and variables. Both the constants and the error log routine, ap_ErrorLog, are found in the modErrorHandling module.

The Declarations Section for Error Log Routines

Listing 7.12 shows the declarations section of the modErrorHandling module.

Listing 7.12. VideoApp.mdb: Error Log Routine Declarations
 Option Compare Database Option Explicit '-- Constants for how to handle the error. Public Const apTryAgain = 1 Public Const apExitApplication ...

Get F. Scott Barker's Microsoft® Access 2000 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.