Chapter 15: Using the VBA Debugging Tools . . . . . . . . . . . . . . . . . 497
Testing and Debugging Your Applications ........................................................................498
Understanding the Sources of Errors ................................................................................499
Syntactical errors ....................................................................................................499
Logical errors ..........................................................................................................501
Runtime errors ........................................................................................................501
Avoiding errors ........................................................................................................502
Using the Module Options ................................................................................................504
Auto Syntax Check ..................................................................................................504
Break on All Errors ..................................................................................................504
Require Variable Declaration....................................................................................505
Compile on Demand ..............................................................................................505
Auto List Members ..................................................................................................505
Auto Quick Info ......................................................................................................505
Auto Data Tips ........................................................................................................506
Compiling VBA Code ........................................................................................................506
Traditional Debugging Techniques ....................................................................................508
Using MsgBox..........................................................................................................508
Using compiler directives ........................................................................................509
Using Debug.Print ..................................................................................................511
Using the Access Debugging Tools ....................................................................................512
Getting to know the Immediate window..................................................................512
Running code with the Immediate window ............................................................512
Suspending execution with breakpoints ..................................................................513
Stepping through statements ..................................................................................515
Using the Locals window ........................................................................................517
Setting watches ........................................................................................................518
Using conditional watches ......................................................................................520
Using the Call Stack window ..................................................................................521
Summary ..........................................................................................................................522
Part III: More Advanced Access Techniques
523
Chapter 16: Working with External Data . . . . . . . . . . . . . . . . . . . 525
Access and External Data ..................................................................................................526
Types of external data ..............................................................................................526
Methods of working with external data....................................................................526
Linking External Data........................................................................................................529
Linking to external database tables ..........................................................................530
Limitations of linked data ........................................................................................532
Linking to other Access database tables ..................................................................533
Linking to ODBC data sources ................................................................................536
Linking to dBASE databases (tables) ........................................................................536
Linking to Paradox tables ........................................................................................537
xxiii
Contents
02_046732 ftoc.qxp 11/21/06 8:43 AM Page xxiii
Previous Main Next