Microsoft Access 2010 Bible

(Rick Simeone) #1

1340


Index


VBA modules
creating, 391–392
definition, 380
editing, 393
form, 390
Option Explicit directive, 394
versus procedures, 380
report, 390
sections, 394
standard, 389–390
types of, 389–391
variable declarations section, 394, 427
VBA objects. See also VBA collections.
definition, 406
VBA parameters
definition, 388, 442
naming conventions, 442
passing to functions, 443–445
sales tax calculation (example), 445–447
VBA procedures. See also VBA, event procedures; VBA
functions; VBA subroutines.
Call statement, 437
calling, 437
calling from data macros, 576
compiling, 397
creating, 395, 397–399, 436
definition, 380
editing, 399
versus modules, 380
naming conventions, 435–436
scope, 432–434
testing in Immediate window, 399–401
VBA statements
_ (underscore), continuation character, 389
definition, 380
example, 381
VBA subroutines. See also VBA procedures.
calling, 436
components of, 436
creating, 437–441
definition, 380
naming conventions, 435–436
overview, 435–436
VBA variables
& (ampersand), concatenation operator, 422
= (equal sign), assignment operator, 422
assigning values to, 422
case sensitivity of names, 423

VBA event procedures, for forms
closing forms, 469–470
confirming deletions, 470–471
creating, 456–459
opening forms, 468–469
verifying, 466–468
VBA events. See also specific events.
categories of, 452
data, 452
error, 452
focus, 452
keyboard, 452, 455, 457
list of, 455
mouse, 452, 455, 457
for pivot tables, 464
print, 452
sequence of, 465–466
timing, 452
triggering VBA code, 452–453
windows, 452
VBA events, forms
data changes, 465–466
data management, 458–459
focus changes, 465
mouse activity, 466
opening/closing, 465
VBA functions. See also VBA procedures.
calling, 436
creating, 441–442
definition, 380
description, 388–389
versus procedures, 436
VBA help
Auto List Members, 396
Auto Quick Info, 396–397
Intellisense, 395–397
VBA looping
Do...Loop statements, 404–405
For Each statements, 409–410
endless loops, preventing, 405
Exit Do statements, 405
For...Next statements, 405–406, 408–409
overview, 404
With statements, 408–409
terminating the loop, 405
through code, 404–406
through collection items, 408–410
While clause, 404–405

52_475348-bindex.indd 134052_475348-bindex.indd 1340 4/1/10 2:02 PM4/1/10 2:02 PM

Free download pdf