Understanding All About VBA for Access

Computing has really changed how people approach tasks these days and this is mainly due to applications integrated with computers. This has subsequently increased productivity due to the number of automated tasks being conducted. VBA for Access is one such application exclusively used on the Microsoft Windows platform. So what exactly is Visual Basic for Applications? This is a powerful tool that enables one to build user-defined functions and other low-level functionalities via dynamic link libraries allowing access to Windows API and automation of tasks and processes in Microsoft Office Applications. In access, VBA code adds functionality to the database.
It is important to note that VBA is not a full Object Oriented programming language but it shares some of the basic concepts used in C++. Forms, fields, reports, queries worked on in the Access application are considered as objects and they are the basic components of any database. In order to tie the database objects together, some programming is needed and that is where visual basic programming comes into play since it has the components needed to create a complex database and manage it.
Form or Report Based Module
When using a report or a form to open code from Microsoft Access, Microsoft Visual Basic will automatically create and display a new module for the report or form. To simplify the entering of built-in commands, VBA provides Intellisense that also displays the methods and properties available for the form automatically.
Introducing Controls Events
Action occurring as a result of a control is called an event. Launching an event for a control in Microsoft Access, you will right-click the control on an unoccupied area of a report or form and click the Build Event option. In the dialog box for Event Builder, click Code Builder then OK. Microsoft Visual Basic has an Object combo box select form. Select control in the procedure combo box.
Project Window
The project window is positioned on the left side of the window and is used to display the coding segments for objects in the project.
Code Editor
This is the work area you will use to write code. In the Microsoft Visual Basic programming environment, it occupies the largest section. It has an Object combo box that will allow one to choose a specific object and have access to its actions. The Procedure combo box, on the other hand, will allow selection of an action corresponding to the Object in the Object combo box.
Closing VBA
To return to Microsoft Access, you can use Alt + F11 shortcut. To close Microsoft Access, click File then Close.

This entry was posted in Database and tagged . Bookmark the permalink.