Chapter 14. Debugging Your Access Applications


  • Verifying an application's features

  • Identifying where errors come from and how to avoid them

  • Setting up code module options

  • Getting help with your VBA code

  • Debugging the traditional way, with MsgBox and Debug.Print

  • Taking advantage of the debugging tools available in Access

Many Access applications rely on significant amounts of VBA (Visual Basic for Applications) code in forms and reports, and as stand-alone modules. Because of its power and flexibility, VBA is used for all aspects of application development, from communicating with the user to massaging and transforming data on its way from tables and queries to forms and reports.

Because VBA code is often complicated (or at least, seems complicated!) debugging an error or problem in an application can be difficult and time-consuming. Depending on how well organized the code is, and whether simple conventions, such as providing descriptive names for variables and procedures, were followed, tracking down even a small coding bug can be a frustrating experience.

Fortunately, Access provides a full complement of debugging tools to make your life easier. These tools not only save time by helping you pinpoint where a coding error occurs, but can help you better understand how the code is organized and how execution passes from procedure to procedure.


This chapter largely ignores the errors caused by poor design — misrepresentation of data caused by ill-designed queries, update ...

Get Access® 2010 Bible now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.