Introduction to
Access VBA & Application Development

2 Days
Versions XP, 2003 and 2007

Course Description

The overall objective of the course is to introduce students to the Visual Basic for Applications (VBA) programming environment of Microsoft Access. Through lecture and hands-on practice, students will be introduced to programming concepts and complete a variety of projects that use VBA to automate Microsoft Access. This course is designed for users responsible for building user-friendly database applications and interfaces.

Prerequisites

In order to successfully complete this course, one or more of the following should describe you:

  • You have completed Softek’s Introduction, Intermediate, and Advanced Access classes or have very similar knowledge. You are comfortable building databases, creating tables, running queries, designing forms, and generating reports.
  • You are a developer who has a considerable amount of experience with Access, but no knowledge of Visual Basic for Applications (VBA).
  • You are a developer who has used macros.
  • You are a developer who has no programming experience in VBA and wants to learn about how VBA can automate your Access applications.

Overview of the Access Programming

Event-driven Programming Concepts

Understanding Access Objects

Handling Events with Macros vs. VBA

The VBA IDE (Integrated Development Environment)

Overview of the Development Lifecycle

Using Form and Report Modules

Overview of Standard Modules

Interactive Code

Compiling Code

Actions vs. Methods

Preventing Errors in Code

The Use of Variables

Writing Code to Automate Tasks

Learning When Events Occur and Deciding When to Respond

Understanding Object Properties and Methods

Use of Object Naming Conventions in Code

Writing Subroutines

Understanding Variable Declaration

Declaring Variables

Understanding the Different Variable Types and Scope

Using Built-in Functions

Using If…Then…Else

Trapping Errors

Compiling and Debugging Code

The Concept of Writing Reusable Procedures

Sample Exercises Performed

As concepts are discussed, below are some of the exercises performed during the 2-day class. All code samples are included in the course documentation and can easily be transferred to an existing or new Access application.

  • Write code to make navigation buttons smarter (e.g., dim Previous button if user is on first record).

  • Write code to ensure the accuracy of data by validating data before it is saved to the database.

  • Create generic error trapping code to incorporate in event procedures.

  • Write code that evaluates the value of a variable and takes a specific action based on the value.

  • Write code to control the appearance of a form when it is opened.

  • Write code that will display a message when a report is run and no records meet the report record selection criteria.

  • Write code to display custom messages to users.

  • Write code to control the format of data entered on forms.

  • Evaluating and Correcting Errors.

  • Write Code that interacts with users.

Other Helpful Links

Access - Introduction Agenda

Access - Intermediate Agenda

Access - Advanced Agenda

Access - VBA Programming Agenda

Database Design

Top of Page