Learn Access Now!
Chapter 19
Previous Section in Chapter 20
Chapter 21
Chapter 20: Using Visual Basic for Applications
(This is section 6 of 6 in this chapter)
Summary
VBA provides a complete programming language you can use to create event-driven programs for your databases. Using VBA is similar to using other versions of Basic for the Windows environment, such as Visual Basic. In this chapter, you learned the bare essentials of programming in VBA.
Before you move on to Chapter 21, make sure you understand the following key concepts:
- VBA is a programming language based on older versions of Basic.
- A VBA program is made up of procedures; a procedure is a series of programming lines designed to accomplish a particular task.
- There are two types of procedures: functions and subroutines. The difference between the two is that functions are designed to return a value, and subroutines are not.
- A VBA program can contain many different components, including statements, variables, operators, and functions. When programming, you combine these elements to accomplish a task.
- In VBA, you can use a hierarchical addressing system to address database objects and collections of objects.
- The VBA Editor is where you develop VBA programs. To display the VBA Editor, you first click your mouse on the Modules button in the Database window and then click on New.
- VBA provides several tools you can use to help test your programs. These include the Immediate window, Debug.Print, and breakpoints.
- You can develop event procedures as part of your forms and reports. You develop an event procedure in much the same way as a regular procedure.
If you are interested in programming in VBA, the best thing to do is to simply try things out. You will also probably want to get a hold of a good book on programming either in VBA or Visual Basic.
Chapter 21 is the last chapter in Learn Access Now. In it, you will learn how to put together an application which utilizes everything you have learned in this book to this point.
Learn Access Now!
Chapter 19
Previous Section in Chapter 20
Chapter 21