xx
Contents
Organizing VBA Code .......................................................................................................530
Compiling VBA Code ........................................................................................................532
Traditional Debugging Techniques ...................................................................................534
Using MsgBox .........................................................................................................534
Using Debug.Print ...................................................................................................537
Using the Access Debugging Tools ....................................................................................538
Running code with the Immediate window .............................................................538
Suspending execution with breakpoints ..................................................................539
Looking at variables with the Locals window ..........................................................544
Setting watches with the Watches window ..............................................................545
Using conditional watches .......................................................................................547
Using the Call Stack window ...................................................................................548
Summary ..........................................................................................................................549
Chapter 15: Using Access Data Macros . . . . . . . . . . . . . . . . . . . . . . . . . . 551
Introducing Data Macros ...................................................................................................551
Looking at How Data Macros Are Created .........................................................................553
Using the Macro Designer .......................................................................................553
Using the Action Catalog .........................................................................................557
Discovering Table Events ..................................................................................................562
Before events ...........................................................................................................562
After events .............................................................................................................564
Building Macros ................................................................................................................566
Adding macro items ................................................................................................566
Manipulating macro items .......................................................................................569
Moving macro items ................................................................................................572
Collapsing macro items ...........................................................................................573
Saving a macro as XML ...........................................................................................574
Recognizing the Limitations of Data Macros ......................................................................575
Summary ..........................................................................................................................576
Part III: More-Advanced Access Techniques 577
Chapter 16: Working with External Data . . . . . . . . . . . . . . . . . . . . . . . . . 579
Looking at How Access Works with External Data ............................................................580
Types of external data .............................................................................................580
Ways of working with external data ........................................................................581
Linking External Data .......................................................................................................584
Linking to external database tables ..........................................................................585
Limitations of linked data ........................................................................................587
Linking to other Access database tables ...................................................................588
Linking to ODBC data sources ................................................................................590
Linking to xBase files ...............................................................................................591
Linking to non-database data ..................................................................................591
02_475348-ftoc.indd xx02_475348-ftoc.indd xx 4/1/10 1:42 PM4/1/10 1:42 PM