• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 27. Learning Visual Basic for Ap... > Understanding the Role of VBA in Acc...

Understanding the Role of VBA in Access

Historically, productivity applications—such as the members of Microsoft Office—have used macros (short for macroinstructions) to automate repetitive operations. Microsoft Word and Excel, for instance, let you capture a sequence of menu choices, mouse clicks, and keyboard operations. You save the captured sequence as a macro that you subsequently execute from a menu choice or a shortcut-key combination. The macros in recent versions of Word and Excel consist of Visual Basic for Applications (VBA) code, but you don’t need to understand VBA programming to create and execute Word and Excel macros. Unfortunately, the keyboard and mouse actions you use with Access applications don’t translate to a usable macro. For better or worse, automation of Access applications requires programming.

Simple Access applications require you to write little or no VBA code. Most users of early versions of Access wrote Access macros, rather than various flavors of Access Basic to automate their applications. Access macros define actions, such as opening a form, that you assign to events, such as clicking a command button. Starting with Access 95, Microsoft recommended that you use VBA code instead of macros, with the clear implication that macros might not be supported in future versions of Access. (Access 2003 does support macro operations, but the Microsoft documentation states that it does so primarily for backward compatibility.)


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint