Using the Form Design Window

graphics/design_view.gif graphics/toolbox.gif To modify the design of the form you create with the Wizard, click the View button on the toolbar to open the Form Design window (see Figure 14.9, where the height of the form has been increased). The floating window that appears in Form Design mode contains an undocked toolbar, called the Toolbox, that lets you place new control elements on a form. Using the Toolbox to add new control elements to the form is covered in the next chapter. For this exercise, hide the Toolbox by clicking the Toolbox button on the Forms toolbar or by clicking the Close Window button in the upper-right corner of the Toolbox.

Figure 14.9. The basic frmHRActions form is shown in Design view.

graphics/14fig09.jpg

Note

graphics/toolbox.gif

Access usually shows the Toolbox automatically whenever you enter Form Design mode. If you've manually closed the Toolbox, Access doesn't automatically display it the next time you open the Form Design window. To display the Toolbox, click the Toolbox button on the Forms toolbar, or choose View, Toolbox.


The frmHRActions form lets you experiment with methods of modifying forms and their contents, which are described in the following sections.

Tip

graphics/form_select.gif

Use the Form Select button to select the entire form when a section or control is the currently selected object. Clicking the Form Select button is much faster than choosing Edit, Select Form. It's even faster, however, to press Ctrl+R.


Elements of the Form Design Window

Access divides forms into five sections: Form Header, Page Header, Detail, Page Footer, and Form Footer. Page Headers and Footers are optional, and don't appear in Figure 14.9. The Form Design window includes the following basic elements:

  • The Form Design toolbar contains buttons that are shortcuts for menu selections in Form Design mode. The functions of the buttons and their equivalent menu choices are listed in tables in the next section, "Form Design Toolbar Buttons and Menu Choices."

  • The Formatting toolbar contains buttons that are shortcuts for color, text, border, and various other formatting options. The functions of the formatting buttons and their equivalent menu choices are listed in tables in the next section.

  • Vertical and horizontal rulers help you determine the size and placement of objects on the form.

    Tip

    The rulers are calibrated in inches for the U.S. version of Access and in centimeters for versions of Access that are supplied to countries where the metric system is used. To change from U.S. to metric units, open Control Panel's Regional Settings or Options tool, click the Number tab, and change the Measurement System setting from U.S. to Metric.


  • The top of the Form Footer bar represents the bottom of the form. You can click and drag this bar to a new location. Margins are important when you are designing a subform to fit within a rectangle of a predetermined size on the main form.

  • Vertical and horizontal scroll bars let you view those parts of the form that are outside the boundaries of the form window.

  • A Form Header bar defines the height of the form's header section. The bar appears only if you choose to add a header and footer to your form, or you create the form with the Form Wizard. The Form Header section contains static text, graphic images, and other controls that appear at the top of the form. The Form Header appears only on the first page of a multipage form; subsequent printed pages of forms display an optional Page Header. (Page Headers and Footers don't display in Form view; Page Headers and Footers apply only when you print forms.) You add Form and Page Headers by choosing View, Form Header/Footer and View, Page Header/Footer, respectively.

  • A Form Detail bar divides the Form Header from the rest of the form. Form controls that display data from your tables and queries, plus static data elements such as labels and logos, are on the Form Detail bar.

  • A Form Footer bar defines the height of the Form Footer section. The Form Footer section is similar in function to the Form Header section. If you print a multipage form, the Form Footer appears only at the bottom of the last page; optional Page Footers appear at the bottom of preceding printed pages.

Note

Although the form shown previously in Figure 14.9 has both Form Header and Form Footer sections, neither section takes up any space on the form that's why the Form Header bar touches the Detail bar, and the Form Footer bar touches the bottom margin of the form. Even though no text or other information is in the header and footer areas, the Form Wizard adds these two elements to the form automatically. When you create a new, blank form without using the Form Wizard, header and footer sections aren't added automatically.


You delete Form Header and Form Footer sections by choosing View, Form Header/Footer to clear the menu check mark. Similarly, you delete Page Headers for printed forms, by choosing View, Page Header/Footer.

Note

If a header or footer section contains any text or other form controls when you try to delete it, Access displays a dialog warning that you are about to lose the contents of the header and footer.


Form Design Toolbar Buttons and Menu Choices

The Form Design toolbar of Access 2003 contains several buttons that apply only to the design of forms. You select color and font options from the Format toolbar. Table 14.1 lists the function and equivalent menu choice for each of the Form Design toolbar buttons that are specific to Access 2003. The buttons that relate to text and color formatting are described in the following section, "The Formatting Toolbar."

Table 14.1. Standard Form-Related Toolbar Buttons in Form Design View

Button

Menu Choice

Function

graphics/subform.gif

View, Form View

Displays the form in Run mode (clicking the arrow at the right of this button displays a drop-down list that lets you select Datasheet view).

graphics/save.gif

File, Save

Saves the current form.

graphics/search.gif

File, Search

Opens the Basic Search task pane.

graphics/print.gif

File, Print

Prints with the current printer settings all records in the table using the onscreen form to format the printed data.

graphics/preview.gif

File, Print Preview

Selects Print Preview to display how your form appears if printed. You can print the form from the Print Preview window.

graphics/cut.gif

Edit, Cut (Ctrl+X)

Copies selected controls to the Clipboard and deletes them from the form.

graphics/copy.gif

Edit, Copy (Ctrl+C)

Copies selected controls to the Clipboard for duplication.

graphics/paste.gif

Edit, Paste (Ctrl+V)

Pastes controls on the Clipboard to the active section of the form.

graphics/painter.gif

None

Invokes the Format Painter and copies formatting from selected objects to another object of similar type.

graphics/undo.gif

Edit, Undo

Undoes the changes you made to the form in last to first order.

graphics/redo.gif

Edit, Redo

Redoes the undoes you made to the form in sequence.

graphics/insert_hyperlink.gif

Insert, Hyperlink

Inserts a new Hyperlink control or lets you edit an existing Hyperlink control.

graphics/field_list.gif

View, Field List

Displays a list of the fields in the query or table that's the data source for the main form.

graphics/toolbox.gif

View, Toolbox

Displays or closes the Toolbox.

graphics/auto_format.gif

Format, AutoFormat

Applies your choice of several predefined form formats, including formatting for the back ground bitmap of a form, text fonts, and color settings.

graphics/code.gif

View, Code

Opens the VBA Editor for the code behind the active form.

graphics/properties_window.gif

View, Properties

Displays the Properties window for one of the two sections of the form when you click the section bars, for the entire form after you click the Form Select button, or for a control when you select it.

graphics/build_wizard.gif

None

Displays the Build Wizard for the selected object or property in the form. This button is enabled only if Access has a Builder for the selected item.

graphics/not_applicable.gif

None

Creates a new object (Table is the default). Click the arrow at the right of this button to see a drop-down list of the objects you can create. You can't run AutoForm or AutoReport in Form Design view.

Note

graphics/access_2002_new_icon.gif

Multiple Undo and Redo operations in Form, Report, and Table Design view were new in Access 2002. In previous versions, Undo and Redo were limited to a single design change.


Figure 14.10 shows the Form Design window after adding Page Headers and Footers to the form and clicking the Properties button with the EmployeeID text box selected.

Figure 14.10. The Form Design window displays the Properties window for the selected control, which is EmployeeID in this example.

graphics/14fig10.gif

The Formatting Toolbar

Access displays in Form and Report Design view shortcut buttons and drop-down lists for all text formatting, line, color, and cell effects options on a separate toolbar: the Formatting toolbar. The Object list at the extreme left of the Formatting toolbar displays the name of the currently selected object on the form and lets you rapidly select another object on the form by selecting its name in the list. In Figure 14.10, the EmployeeID text box is the currently selected object, so the Font and Font Size lists are enabled.

Table 14.2 lists the function of each text-formatting button in Form Design view and its equivalent property setting.

Table 14.2. Toolbar Buttons for Text Controls in Form Design Mode

Button

Function

Property and Value

graphics/bold.gif

Sets text style to bold (the default for titles and labels).

Font Weight = Bold

graphics/italic.gif

Sets italic text style.

Font Italic = Yes

graphics/underline.gif

Sets underline text style.

Font Underline = Yes

graphics/align_left.gif

Left-justifies text within border.

Text Align = Left

graphics/align_justify.gif

Centers text horizontally within border.

Text Align = Center

graphics/align_right.gif

Right justifies text within border.

Text Align = Right

graphics/fill_back_color.gif

Displays a color palette from which you choose the background color for the selected object.

Back Color = number

graphics/font_fore_color.gif

Displays a color palette from which you choose the color of the text in the selected object.

Fore Color = number

graphics/line_border.gif

Displays a color palette from which you choose the color for the border of the selected object.

Border Color = number

graphics/drop_list.gif

Displays a drop-down list from which you choose the width of the selected object's borders. You can select a hairline width or widths ranging from 1 to 6 points.

Border Width = width

graphics/special_effects.gif

Displays a drop-down list from which you choose a special effect for how the selected object is displayed. You can choose Flat, Raised, Sunken, Etched, Shadowed, or Chiseled.

Special Effect = name



Special Edition Using Microsoft Office Access 2003
Special Edition Using Microsoft Office Access 2003
ISBN: 0789729520
EAN: 2147483647
Year: 2005
Pages: 417

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