Chapter 15. Using the VBA Debugging Tools
IN THIS CHAPTER
Testing and debugging your applications
Getting help with VBA
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 ...