The Visual Basic Editor
Before looking at how to write VBA code, you should be familiar with the Visual Basic Editor (VBE) feature of Access. VBE is included with Access, along with most of the other Office applications, and is the application that is used to write Visual Basic for Applications (VBA) code for an Access database application. The VBA programming language is a derivative of the Visual Basic language, and is most similar to Visual Basic 6.0. VBE provides a number of different tools and is much like other Microsoft code editors, so if you've used other Microsoft code editors such as Visual Basic 6.0 or Visual Studio .NET, you'll feel right at home in VBE. This lesson discusses the basics of VBE and how to use it to create VBA code. Figure 51-1 provides an image of VBE.
The lesson is designed to provide information about the Visual Basic Editor and how to use it with Access 2010. You should be familiar with creating databases and creating the basic objects provided by an Access database. Otherwise, this lesson does not require any other specific knowledge of Access or writing VBA code.
VBE is built directly into the Access 2010 product, and Access provides several different methods for starting VBE:
- Clicking the Visual Basic button on the Create Ribbon.
- Choosing the Code Builder option from the Choose Builder dialog for an event ...