Microsoft Access 2010 Bible

(Rick Simeone) #1

Chapter 19: Advanced Access Form Techniques


699


You can even make controls on a form transparent so that the form’s background picture shows
through the controls (see Figure 19.12). In this case (frmEmployees_Background), the back-
ground of each label control is set to Transparent, letting the form’s background picture show
through.

FIGURE 19.12

Transparent controls allow the background picture to show through.


It’s easy to overdo the background picture added to Access forms, but, when carefully used, back-
ground pictures can make forms easier for users to understand.

Caution
Background pictures added to a form noticeably slow down the form’s appearance on the screen. Generally
speaking, you should use a background picture when the benefit provided by the picture outweighs the
unavoidable performance degradation caused by the picture’s presence.


Fine-tuning your form’s behavior with form events
Form events allow you to fine-tune your form’s behavior when filters are applied to or removed
from the form’s underlying data source.

ApplyFilter
The ApplyFilter event fires whenever the user applies a filter by clicking one of the filter but-
tons (Ascending, Filter, Selection, and so on) in the Sort & Filter ribbon group. You can use the
ApplyFilter event to test the user’s filtering criteria to make sure the filter makes sense. Use the
form’s Filter property to determine whether the filter being applied contains valid criteria, or to
modify the Filter property in code.

You can also use the ApplyFilter event to hide certain fields that should not be viewed by all
users, or to display a dialog box requesting additional identification information such as an extra
password or username.
Free download pdf