Access supports two different programming languages:
- The painting-by-numbers macros, which you can use to perform basic functions;
- The far more powerful VBA (Visual Basic for Applicatons) programming language.
If you're going to be using Access, we think you should be learning VBA - it's far more powerful, and is compatible with the programming languages used by other MS Office applications such as Excel and Word. On this two-day course you'll learn about the DoCmd object, variables, handling form events, linking to recordsets and much more!
Prerequisites
Delegates should only attend this course if they have a good working knowledge of Access basics, and if they are proficient computer users. Experience of programming, while useful, is not essential.
Course Contents
The VBA code editor
- Two ways to create modules
- Using Project Explorer
- Basic subroutines and comments
Messages and variables
- The all-powerful DoCmd object
- Displaying messages
- Getting input from users
- Using variables
Creating functions
- Passing arguments
- Returning values
Visual Basic explained
- Objects and collections
- Methods and properties
- The Access object model
- Getting help in VBA
Attaching code to forms
- Attaching code to buttons
- Attaching code to events
- Making code not form-specific
- Manipulating form/control properties
Looping
- The four types of loop
- Looping over all open forms
- Looping over controls
- Looping over Access Objects
Recordsets
- Choosing ADO or DAO
- Adding data
- Editing data
- Deleting data
Debugging and error handling
- Stepping through macros
- Setting breakpoints
- Trapping for errors
Case studies
- Navigation buttons
- Creating a simple menu
- Validating forms
- Criteria forms
Linking to Excel and Word (*)
- Referencing other applications
- Manipulating Excel from Access
Modifying queries (*)
- Basic SQL statements
- Amending queries' SQL