Duration: 2 Day
MICROSOFT ACCESS VBA PROGRAMMING
Objectives
To examine and understand the fundamentals of VBA including procedures and functions, expressions, objects, variables and intrinsic functions. To appreciate how to control program execution, working with forms, the PivotTable object, debugging and error handling.
Designed for
Advanced users of Microsoft Access.
MODULE 1: GETTING STARTED
MODULE 2: WORKING WITH PROCEDURES AND FUNCTIONS
- Understanding Modules
- Creating a Standard Module
- Understanding Procedures
- Creating a Sub Procedure
- Calling Procedures
- Using the Immediate Window to Call Procedures
- Creating a Function Procedure
- Naming Procedures
- Organizing Code and Procedures
- Working with the Code Editor
MODULE 3: UNDERSTANDING OBJECTS
- Understanding Classes and Objects
- Navigating the Access Object Hierarchy
- Understanding Collections
- Using the Object Browser
- Working with the Application Object
- Understanding the Form Object
- Working with Properties
- Using the With Statement
- Working with Methods
- Understanding the DoCmd Object
- Working with Events
- Understanding the Order of Events
MODULE 4: USING EXPRESSIONS, VARIABLES, AND INTRINSIC FUNCTIONS
- Understanding Expressions and Statements
- Declaring Variables
- Understanding Data Types
- Working with Variable Scope
- Working with Variable Lifetime
- Considering Variable Scope and Lifetime Together
- Using Intrinsic Functions
- Understanding Constants
- Using Intrinsic Constants
- Using Message Boxes
- Using Input Boxes
MODULE 5: CONTROLLING PROGRAM EXECUTION
- Understanding Control-of-Flow Structures
- Working with Boolean Expressions
- Using the If...End If Decision Structures
- Using the Select Case...End Select Structure
- Using the For...Next Structure
- Using the For Each...Next Structure
- Using the Do...Loop Structure
- Guidelines for use of Branching Structures
MODULE 6: WORKING WITH RECORDSETS
- Declaring and Creating Object Variables
- Working with the ADODB Recordset Object
- Specifying a Recordset Cursor Type
- Locking Records for Updating
- Specifying a Recordset Cursor Location - Optional
- Using the CacheSize Property - Optional
- Understanding Recordset Cursor Properties - Optional
MODULE 7: DEBUGGING CODE
- Understanding Errors
- Using Debugging Tools
- Setting Breakpoints
- Setting Break Expressions
- Using Break Mode during Run Mode
- Stepping through Code
- Determining the Value of Expressions
MODULE 8: HANDLING ERRORS
- Understanding Error Handling
- Understanding VBA's Error Trapping Options
- Trapping Errors with the On Error Statement
- Understanding the Err Object
- Writing an Error-Handling Routine
- Working with Inline Error Handling
|