15. Automating Tasks with Macros
The secret to a long and happy relationship with Access is learning how to make it work the way you want.
As you've already seen, true Access fanatics don't use the ordinary datasheet to enter information. Instead, they create their own customized data entry forms. Similarly, Access fans don't print their data using basic yawn- inspiring tables. Instead, they create richly formatted reports that are just right for presenting their data. And Access pros definitely don't struggle through the same tedious series of steps to accomplish a common taskinstead, they create macros that make Access do the work for them.
A macro is a miniature program that you create and store in your database. Macros can range from the exceedingly simple (like a command that shows a form) to the mind-bendingly complex (like a conditional macro that checks how much raw meat you have in stock, and automatically prints out an order in triplicate if your fridge is empty).
In this chapter, you'll learn how to create basic macros. Then, you'll learn how to make them smarter . By the end of the chapter, you'll be able to put together macros that can fire themselves up when needed, perform an entire sequence of steps, and even make decisions. You'll also be ready to head on to the next chapter, where you'll step up to full-fledged Visual Basic programming.