Microsoft Access 2010 Bible

(Rick Simeone) #1

xix


Contents


Identifying Common Events .............................................................................................454
Form event procedures ...........................................................................................456
Control event procedures ........................................................................................459
Report event procedures..........................................................................................460
Report section event procedures ..............................................................................462
Paying Attention to Event Sequence ..................................................................................465
Looking at common event sequences ......................................................................465
Writing simple form and control event procedures .................................................466
Summary ..........................................................................................................................471

Chapter 13: Accessing Data with VBA Code . . . . . . . . . . . . . . . . . . . . . . 473
Understanding SQL ..........................................................................................................473
Viewing SQL statements in queries .........................................................................474
A SQL primer ..........................................................................................................475
Working with Data ...........................................................................................................485
Understanding ADO Objects .............................................................................................488
The ADO Connection object ...................................................................................489
The ADO Command object .....................................................................................492
The ADO Recordset object ......................................................................................494
Understanding DAO Objects .............................................................................................499
The DAO DBEngine object ......................................................................................501
The DAO Workspace object ....................................................................................501
The DAO Database object .......................................................................................502
The DAO TableDef object .......................................................................................502
The DAO QueryDef object ......................................................................................503
The DAO Recordset object ......................................................................................505
The DAO Field objects (recordsets) .........................................................................506
Writing VBA Code to Update a Table ................................................................................508
Updating fields in a record using ADO ....................................................................509
Updating a calculated control ..................................................................................513
Adding a new record ...............................................................................................517
Deleting a record .....................................................................................................517
Deleting related records in multiple tables ...............................................................518
Summary ..........................................................................................................................521

Chapter 14: Debugging Your Access Applications  . . . . . . . . . . . . . . . . . 523
Testing Your Applications .................................................................................................524
Using the Module Options ................................................................................................525
Auto Syntax Check ..................................................................................................525
Require Variable Declaration ...................................................................................527
Auto List Members ..................................................................................................528
Auto Quick Info ......................................................................................................528
Auto Data Tips ........................................................................................................529
Break on All Errors ..................................................................................................529
Compile on Demand ...............................................................................................530

02_475348-ftoc.indd xix02_475348-ftoc.indd xix 4/1/10 1:42 PM4/1/10 1:42 PM

Free download pdf