Chapters 10 and 11 gave you substantial exposure to selecting, moving, resizing, aligning, and otherwise manipulating controls. Nevertheless, I thought it would be useful to summarize in one place the various techniques available to you.
You select a control by clicking directly on it. The control displays a moving handle and sizing handles. If you select a text box with an attached label, the label's move handle also is displayed. If you select the label, the text box's move handle is visible (see Figure 12.19).
Figure 12.19. The currently selected object is the label, so only the text box's move handle is displayed.
A selected control has several sizing handles. You use the sizing handles that border the control to resize it. You use the move handle in the upper-left corner to move the control.
You can also select any control from the drop-down list in the Object Selector (see Figure 12.19). If you haven't given the object a meaningful name, however, this method could prove difficult. To name a control, right-click it; choose Properties, Other tab; and type a name in the Name property.
To deselect a control, click outside it. Make certain you are not selecting any other element.
You can select several controls at the same time by these methods:
You can group controls so that they stay together and can be resized as a group. Select the fields and choose Format, Group. If you use the Shift+click method, the text boxes are grouped; if you use the method of drawing a rectangle around them, both text boxes and labels will be grouped. Choose Format, Ungroup to ungroup controls.
To resize a control, move your mouse pointer to any sizing handle. When the pointer becomes a double arrow, drag it. Sizing handles in the middle of the control reduce or increase either the length or the height. Sizing handles at the corners resize both dimensions at the same time.
As an alternative to using sizing handles, you can use the control's property sheet. Right-click the control and choose Properties, Format tab. Edit the properties for Width and Height.
You can use the Format, Size, To Fit command to get a best fit for the text string in a label. This command doesn't work in a text box, however, because its values vary in length.
You can resize a control grid line by grid line. Select the control and, while pressing Shift, tap the corresponding arrow key to lengthen, widen, or reduce dimensions.
To move a text box with an attached label, hover the pointer at any border, away from any handle. When the pointer becomes an open hand, drag the text box; the label follows (see Figure 12.21).
Figure 12.21. You use the open-hand pointer to move a text box and its accompanying label.
To move either the text box or the label separately, hover the pointer over the respective move handle. When the pointer becomes a pointing finger, drag the control (see Figure 12.22).
Figure 12.22. You use the pointing-finger pointer to move a label or text box alone.
You can also move a control grid line by grid line. Select the control and press the corresponding arrow key. If you want to nudge the control just a wee bit, press Ctrl while you press the corresponding arrow key.
The Format menu also has commands that adjust horizontal and vertical spacing. In Figure 12.23, the three controls have unequal vertical spacing. In Figure 12.24, the three controls have been selected and the Make Equal command from the Vertical Spacing submenu of the Format menu has been applied. Note that the top and bottom label/text box pair has remained stationary, while the middle controls have moved upward.
Figure 12.23. The three controls are not equally spaced.
Figure 12.24. You use the Make Equal command to balance the spacing between controls.
You can increase or decrease the spacing between controls by selecting them and using the applicable command from the Vertical Spacing and Horizontal Spacing submenus.
The Align command on the Format menu enables you to align controls to the left, right, top, or bottom. In each case, you must select two or more controls. You can think of the control to which Access aligns as the one with the "mostest." For example, if you select three controls and choose Format, Align, Left (see Figure 12.25), Access aligns two controls to the third that is leftmost (see Figure 12.26).
Figure 12.25. The Align commands help you line up controls. Here the MerchID and MerchName text boxes will be aligned left in relation to the MerchDescription text box.
Figure 12.26. The MerchID and MerchName text boxes are now aligned left with the MerchDescription text box.
In the background of the form and report design areas is a grid, a scheme of dots. The menu selection View, Grid toggles the grid on and off. New controls will be aligned to the grid, provided that Format, Snap to Grid (another toggle) is selected. Occasionally, you will want to turn off Snap to Grid so you can position controls exactly where you want them.
You can set the number of grid lines per unit of measurement (usually an inch) using the Grid X and Grid Y properties on the Format tab of the Form property sheet.