Chapter 10. Using VBA to Enhance Forms

When most users hear that they need to utilize VBA to perform a task in Access, they typically think of programming. Unfortunately, this conjures images of grunts and trolls locked away in a dank basement chained to a mainframe terminal feverishly pounding the keyboard and laughing maniacally at hexadecimal displays. Fearing this, most users would rather allow their VCR to blink "12:00 a.m." rather than suffer the wrath of becoming a programmer. Although VBA technically is programming, it's really more about the ability to automate processes rather than inventing new operating systems or other complex algorithmic solutions. Most times, even Microsoft refers to it as Office Automation, hoping to tone down the fear of users. Although the stress here is automation, the developer will not be referred to as an automater—developer, programmer, or creator is still the norm.

So, now that your fears are subdued, turn your focus to the automation concept with this simple example. Suppose that a salesperson acquires a customer lead, and would like to send that lead an informational brochure. For the inexperienced Access user or developer, he or she may open the table (or worse, an Excel spreadsheet), enter the data, and close the table. Next the salesperson may create a query to extract that one entered lead, bind that query to a label report, and then print it. Then he or she opens a Word Document, types a cover letter to the lead, and prints that ...

Get Access 2003 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.