Microsoft Office Tutorials and References
In Depth Information
Breaking Out of the Control Layout
Luckily, Access has features that make it easy to line up your controls, so
you don’t have to squint at the screen and drag each control left or right by
microscopic amounts. Instead, you can select a bunch of controls and deal
with them all at the same time. To select more than one control, click one
control and Shift+click the rest of the controls, or drag your mouse around
the group of controls. Access selects all the controls that are within that
area, even if only part of a control is in the area.
After you select a bunch of controls, you can do the following things
✦ Move groups of controls. If you want to move a bunch of controls
together, select them all and then drag them to a new location. Access
leaves the spacing among the controls unchanged.
✦ Make controls the same size. You can tell Access to make all the
selected controls the same height or width. To make the widths of the
selected controls the same, click the Size/Space button in the Sizing &
Ordering group on the Arrange tab of the Ribbon, and choose To Widest
to make all the controls as wide as the widest control you selected or To
Narrowest to match the narrowest (left to right). To make the heights of
the controls the same, choose To Tallest or To Shortest.
✦ Line up your controls. You can adjust the edges of your controls to
line up with the gridlines that appear in Design view. With the controls
selected, click the Align button in the Sizing & Ordering group on the
Arrange tab of the Ribbon, and choose To Grid. Access moves the edge
of each control to the nearest gridline.
You can also get Access to move all the selected controls so that they’re
left-aligned (that is, the left edges line up) or right-aligned. Click the
Align button in the Sizing & Ordering group on the Arrange tab of the
Ribbon, and choose Left or Right. We like to see labels right-aligned next
to text boxes that are left-aligned, but it’s a matter of taste!
You can turn on Snap to Grid for the whole form so that when you move
or resize controls, Access aligns their sides with the grid. Click the Size/
Space button in the Sizing & Ordering group on the Arrange tab of the
Ribbon to see whether Snap to Grid is selected (outlined in orange). If it
isn’t, click it!
✦ Space controls evenly. Controls look better if a consistent amount of
vertical space appears between one control and the next — one gridline
or two gridlines, for example. You don’t have to move controls up and
down by hand; Access can perform this task for you. Select the controls
you want to space, click the Size/Space button in the Sizing & Ordering
group on the Arrange tab of the Ribbon, and choose Equal Vertical.
You can move all the controls together or apart by choosing Decrease
Vertical or Increase Vertical.