Changing the Arrangement of a Form





Changing the Arrangement of a Form

Both automatically-generated forms and forms created by a wizard are functional, not fancy. However, it's fairly easy to customize the layout to suit your needs and preferences. You can add and delete labels, move both labels and text controls around the form, add logos and other graphics, and otherwise improve the layout of the form to make it attractive and easy to use.

While you work with a form's layout, you should pay attention to the shape of the pointer, which changes to indicate the manner in which you can change the selected item. Because a text box and its label sometimes act as a unit, you have to be aware of the pointer's shape before making any change. The shape of the pointer indicates the action to be taken:

Four-headed arrow. Drag to move both controls together, or independently if the pointer is over a large square in the upper-left corner of the control.

Pointing finger. Drag to move just the control.

Vertical arrow. Drag the top or bottom border to change the height.

Horizontal arrow. Drag the right or left border to change the width.

Diagonal arrow. Drag the corner to change both the height and width.


In this exercise, you will rearrange the label and text box controls in a form.

USE the 03_RefineLayout database. This practice file is located in the Chapter05 subfolder under SBS_Access2007.

OPEN the 03_RefineLayout database.


1.
In the Navigation Pane, under Forms, right-click Customers, and then click Design View.

The form is divided into three sections: Form Header, Detail, and Form Footer. We are interested in only the Detail section right now.

Troubleshooting

If you can't see the Form Footer you may have to use the scroll bar to scroll down in the form until the footer appears. You can also right-click an inactive section of the Ribbon and then click Minimize The Ribbon to gain more screen space for your form. Click the minimized Ribbon and click Minimize The Ribbon again to restore the Ribbon.

2.
Point to the right edge of the Detail grid, and when the pointer changes to a double-headed arrow, drag the edge of the background to the right until you can see about seven full grid sections.

3.
Click the LastName text box, and then slowly move the pointer around its border, from handle to handle (there are eight handles), noticing how the pointer changes shape.

If a label or text box can be moved independently, then it will have a larger item selector in its upper-left corner.

4.
Move the pointer over the LastName text box and when it changes to a four-headed arrow, drag it up and to the right of the FirstName text box.

Tip

If you can't move the label independently of the text box, the form is probably in Stacked layout. Drag through all the controls to select them, and then click the Remove button in the Control Layout group on the Arrange tab.

5.
Resize each control, and then arrange them in logical groupings on the form.

Tip

To fine-tune the position of a control, click it and then move the control by pressing the Up Arrow, Down Arrow, Left Arrow, or Right Arrow key. To move the control lesser distances, hold down the Ctrl key while pressing the arrow key. To fine-tune the size of a control, hold down the Shift key while pressing the arrow key.

6.
On the Arrange contextual tab, in the AutoFormat group, click the AutoFormat button.

The AutoFormat gallery opens.

7.
At the bottom of the AutoFormat gallery, click AutoFormat Wizard.

The AutoFormat wizard starts. Unlike most wizards, this one has only one page.

8.
In the AutoFormat dialog box, click the Customize button.

The Customize AutoFormat wizard starts. Unlike most wizards, this one has only one page.

9.
In the Customize AutoFormat dialog box, select the Create a new AutoFormat based on the Form 'Customers' option, and then click OK.

Tip

Form controls inherit whatever theme is set in the operating system. To change the theme, open Control Panel, click Appearance And Personalization, and then under Personalization, click Change The Theme. In the Theme Settings dialog box, select the theme you want, and then click OK.

The New Style Name dialog box opens.

10.
In the Style Name box, type Customers, and then click OK.

In the AutoFormat wizard, the new style appears in the Form AutoFormats list. This style will now be available in any database you open on this computer.

11.
In the AutoFormat wizard, click OK.

Tip

Access saves data automatically as you enter it, but you must manually save layout changes to any object.

CLOSE the Customers form, saving your changes, and then close the 03_RefineLayout database.




 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows