Selecting Multiple Controls

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:

  • Select nonadjacent controls by clicking a control and then holding down the Shift key as you click remaining controls to add them to the selection.
  • Select adjacent controls by clicking anywhere outside a control and dragging the mouse to surround the controls with a temporary rectangle. Access will select all the controls inside the rectangle.
  • Select all the controls by choosing Edit, Select All or by pressing Ctrl+A.
  • Select a specific area of controls by clicking the horizontal or vertical ruler to select all the controls directly under or to the right of the clicked mark. Alternatively, you can drag the mouse pointer across a selection of the rule to extend a selection.

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.

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.

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:

  1. Choose Tools, Options.
  2. Click the Forms/Report tab.
  3. In the Selection Behavior section, select Fully Enclosed, and click OK.

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.

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:

  1. With your form in Design view, choose Edit, Select All, or press Ctrl+A.
  2. To deselect a control, hold down the Shift key and click the control you want to deselect. Access will deselect that control while leaving the rest of the selection intact.

tip - Modify a property in multiple controls


Not only can you move, align, and group multiple controls, but you can also change the properties of more than one control at the same time. Simply select the controls using one of the multiple control selection techniques described in this section. Then click Properties on the Design toolbar. The resulting properties sheet displays a list of properties that are common to all the controls in your multiple selection. When you update a property in the properties sheet, you update that property for each of the selected controls simultaneously.



Microsoft Access Version 2002 Inside Out
Microsoft Access Version 2002 Inside Out (Inside Out (Microsoft))
ISBN: 0735612838
EAN: 2147483647
Year: 2005
Pages: 172
Authors: Helen Feddema

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net