Chapter 12. Understanding the Access Event Model
IN THIS CHAPTER
Understanding how events work
Learning how events are triggered
Understanding how event procedures work
Responding to events in forms and reports
Creating event procedures for forms
Creating event procedures for reports
Working with message boxes
Using variables and data types
Working with Visual Basic logical constructs
When working with a database system, the same tasks may be performed repeatedly. Instead of doing the same steps each time, you can automate the process with VBA.
Database management systems continually grow as you add records in a form, build new queries, and create new reports. As the system grows, many of the objects are saved for later use — for a weekly report or monthly update query, for example. You tend to create and perform many tasks repetitively. Every time you add contact records, for example, you open the same form. Likewise, you print the same form letter for contacts that have purchased a vehicle in the past month.
You can create VBA code throughout your application to perform these tasks. The VBA language offers a full array of powerful commands for manipulating records in a table, controls on a form, or just about anything else. This chapter continues the previous chapters' discussions of working with procedures in forms, reports, and standard modules.
In this chapter, you will use the database file
Chapter12.accdb. Please copy this database file from the book's CD if you wish to follow along ...