Automatically align controls on a form
By default, when you create a new form by using one of the form tools on the Create tab, or when you add fields to a form while it is open in Layout view, Access 2007 puts text boxes and other controls in guides called layouts. A layout, indicated by an orange grid around the controls, helps you align controls horizontally and vertically to give the form a uniform appearance. This article shows you how to add, remove, or rearrange controls in layouts.
In this article
About layouts
Layouts come in two varieties: tabular and stacked.
-
In tabular layouts, controls are arranged in rows and columns like a spreadsheet, with labels across the top. Tabular layouts always span two sections of a form; whichever section the controls are in, the labels are in the section above.
-
In stacked layouts, controls are arranged vertically like you might see on a paper form, with a label to the left of each control. Stacked layouts are always contained within a single form section.
You can have multiple layouts of either type on a form. For example, you might have a tabular layout to create a row of data for each record, and then one or more stacked layouts underneath, containing more data from the same record.
Create a new layout
Access automatically creates stacked layouts in either of the following circumstances:
-
You create a new form by clicking Form in the Forms group on the Create tab.
-
You create a new form by clicking Blank Form in the Forms group on the Create tab, and then dragging a field from the Field List pane to the form.
On an existing form, you can create a new layout by doing the following:
-
Select a control that you want to add to the layout.
-
If you want to add other controls to the same layout, hold down the SHIFT key and also select those controls.
-
Do one of the following:
-
On the Arrange tab, in the Control Layout group, click Tabular or Stacked .
-
Right-click the selected control or controls, point to Layout, and then click Tabular or Stacked .
-
Access creates the layout and adds the selected controls to it.
Switch a layout from tabular to stacked, or vice versa
To switch an entire layout from one type of layout to the other:
-
Select the layout by clicking the orange layout selector at the top left corner of the layout. All of the cells in the layout are selected.
-
Do one of the following:
-
On the Arrange tab, in the Control Layout group, click the layout type you want (Tabular or Stacked ).
-
Right-click the layout, point to Layout, and then click the layout type you want.
-
Access rearranges the controls into the layout type you want.
Split one layout into two layouts
You can split a layout into two layouts by doing the following:
-
Hold down the SHIFT key and click the controls you want to move to the new layout.
-
Do one of the following:
-
On the Arrange tab, in the Control Layout group, click the layout type you want for the new layout (Tabular or Stacked ).
-
Right-click the selected controls, point to Layout, and then click the layout type you want for the new layout.
-
Access creates a new layout and adds the selected controls to it.
Rearrange controls in a layout
-
You can move a control within a layout by dragging it to the location you want. As you drag the field, a horizontal or vertical bar indicates where it will be placed when you release the mouse button.
-
You can move a control from one layout to another layout of the same type. For example, you can drag a control from one stacked layout to another stacked layout, but not to a tabular layout.
Add controls to a layout
To add a new field from the Field List pane to an existing layout
-
Drag the field from the Field List pane to the layout. A horizontal or vertical bar indicates where the field will be placed when you release the mouse button.
To add existing controls to an existing layout
-
Select the first control you want to add to the layout.
-
If you want to add other controls to the same layout, hold down the SHIFT key and also select those controls. You can select controls in other layouts.
-
Do one of the following:
-
If the form is open in Design view, drag the selected fields to the layout. A horizontal or vertical bar indicates where the fields will be placed when you release the mouse button.
-
If the form is open in Layout view:
-
On the Arrange tab, in the Control Layout group, click the type of the layout to which you are adding the controls. If you are adding controls to a tabular layout, click Tabular . If you are adding controls to a stacked layout, click Stacked .
Access creates a new layout and adds the selected controls to it.
-
Drag the new layout to the existing layout. A horizontal or vertical bar indicates where the fields will be placed when you release the mouse button.
-
-
Remove controls from a layout
Removing a control from a layout allows you to place it anywhere on the form without affecting the positioning of any other controls.
-
Select the control you want to remove from the layout. To select multiple controls, hold down the SHIFT key and then click the controls you want to remove. To select all of the controls in the layout, click the layout selector box at the top left corner of the layout.
-
Do one of the following:
-
On the Arrange tab, in the Control Layout group, click Remove .
-
Right-click one of the selected controls, point to Layout, and then click Remove .
Access removes the selected controls from the layout.
-
No comments:
Post a Comment