Chapter 15. Using the VBA Debugging Tools

IN THIS CHAPTER

  • Testing and debugging your applications

  • Getting help with VBA

  • Compiling procedures

  • Handling runtime errors

  • Using the Immediate window

  • Using the Locals window

  • Setting and working with breakpoints

  • Viewing the Call Stack window

Access database applications prepared by even the very best developers have problems. By their very nature, database applications tend to be pretty complicated — especially by the time you consider table and query design, forms design and implementation, and all that VBA code that needs to be written for most databases. Something inevitably goes wrong and causes problems. If you're lucky, the problem and its cause are obvious and easily fixed. A somewhat worse condition exists when you know there's a problem but its source is not immediately apparent. The worst situation for all concerned are those bugs that silently and perniciously damage data or the representation of the data in an application without warning.

This chapter takes a look at the types of problems you'll encounter in Access applications and some of the steps you can take to uncover and repair these critters. This chapter largely ignores the errors caused by poor design: misrepresentation of data caused by ill-designed queries, update and insert anomalies causes by inappropriate application of referential integrity rules, and so on. For the most part, these problems occur because of failing to conform to proper design disciplines, misunderstanding ...

Get Access™ 2007 Bible 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.