Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 12: The Access Event Model


469


FIGURE 12.7

Specifying an event procedure for a control event


FIGURE 12.8

Using an event procedure to open a form


Running an event procedure when closing a form
Sometimes, you’ll want to perform some action when you close or leave a form. For example, you
might want Access to keep a log of everyone using the form, or you might want to close the form’s
Print dialog box every time a user closes the main form.

To automatically close frmDialogProductPrint every time frmProducts is closed, create
an event procedure for the frmProducts Close event. Figure 12.9 shows this event procedure.
Free download pdf