3 4
Regardless of your design task, you’ll be working with controls most of the time. That means you’ll have to select the controls first. Modifying controls one by one is a real nuisance if you’re modifying the same properties or moving or sizing the same controls in the same manner. Here are a few techniques to make selecting (and working with) multiple controls easier and quicker:
When dragging to select adjacent controls, you can control the way Access adds partially selected controls. By default, Access will select any control that’s inside the rectangle, even if it’s only partially selected. This might or might not be what you want. If it isn’t, you can change the Selection Behavior setting to Fully Enclosed. When this setting is active, a control must be entirely within the selection rectangle to be included in the resulting multiple control selection. Let’s look at a quick example of a form containing several controls, as shown in Figure 8-5.
Figure 8-5. The selection rectangle completely encloses some controls while only partially enclosing others.
By default, the selection rectangle shown in Figure 8-5 will select every control it touches or encloses, as indicated by the selection handles shown in Figure 8-6.
Figure 8-6. The default setting selects controls that are completely or partially enclosed.
You can easily change the setting from its default, Partially Enclosed, to Fully Enclosed. To do so, follow these steps:
Now draw approximately the same selection rectangle as shown in Figure 8-5. This time, however, the selection includes just those controls that are completely enclosed by the rectangle. The one control the rectangle touched but didn’t completely surround, Command6, isn’t included in the resulting selection, as shown in Figure 8-7. Access considers a compound control (a control with an associated label control) completely enclosed if theselection rectangle completely surrounds either component, which explains why Access selects the lower text box control.
Figure 8-7. The Fully Enclosed option selects only those controls that are completely enclosed in the selection rectangle.
Selecting Most of the Controls
Sometimes the easiest way to select multiple controls is to select all the controls and then deselect the ones you don’t want. If you’re planning to use most of the controls, this method might result in fewer clicks in the long run.
To put this technique into action, follow these steps:
tip - Modify a property in multiple controls