Chapter 19: Advanced Access Form Techniques .........................................................................
681
FIGURE 19.2
The Property Sheet for the Customers form
Customizing default properties
Whenever you use a tool in the form Design view toolbox to create a control, the control is created
with a default set of property values. This may seem obvious, but what you may not know is that
you can set many of these default values yourself. For example, if you want all list boxes in your
form to be flat rather than sunken, it’s more efficient to change the default SpecialEffect
property to Flat before you design the form, instead of changing the SpecialEffect property
for every list box individually.
To set control defaults, select a tool in the toolbox and then set properties in the Property Sheet
without adding the control to the form. Notice that the title in the Property Sheet is Selection
type: Default <ControlType>. As you set the control’s properties, you’re actually setting the
default properties for that type of control for the current form. Instead of adding the control to the
form, select another control (such as the Select control in the upper-right corner of the Controls
group) to “lock down” the default settings. Then, when you reselect the control you want, you’ll
see that the control’s default properties have been set the way you wanted. When you save the
form, the property defaults you’ve set for the form’s controls are saved along with the form.
In addition to saving you time while designing a form, customizing default properties can speed
the saving and loading of forms. If most controls on the form use the default property settings, the
saved form takes less space, saves faster, and subsequently loads faster when your application uses
it (but doesn’t save memory).