451
CHAPTER
The Access Event
Model
IN THIS CHAPTER
Mastering Access event
programming
Reviewing common events
Understanding event
sequences
W
hen working with a database system, the same tasks may be per-
formed repeatedly. Instead of doing the same steps each time,
you can automate the process with VBA or macros.
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 database 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, you open the same
form. Likewise, you print the same form letter for contacts that have pur-
chased a vehicle in the past month.
You can add VBA code throughout your application to automate 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 chap-
ter continues the previous chapters’ discussions of working with procedures
in forms, reports, and standard modules.
On the CD-ROM
In this chapter, you’ll use the database file Chapter12.accdb. Copy this
database file from the book’s CD if you want to follow along with the exam-
ples presented in this chapter.
This chapter focuses on the Access event model, a vitally important aspect of
Access development. As you’ll see in this chapter, Access provides a wide
variety of events to trigger your code in response to user actions.