Remember that the two most common types of controls are labels and text boxes. Labels contain static contents like the name of a field.
Text boxes usually contain the contents of a field, which changes with each record.
List boxes and combo boxes are two of the best controls for allowing users to view and select data
fi lters. You can further manage the data displayed by tailoring the query used for the Row Source
of the control. Depending on the scenario, you can show additional fields
- to help with the user selection,
- adjust the sort order, or
- show or hide active/inactive records.
Of course, this is another place to leverage the benefi ts of foreign keys; you can show the users the
description from the lookup table while passing the actual ID value to the query.
Both types of controls work well with the cascading controls concept. You will usually hear the term cascading combo boxes,
but the concept applies equally to the List box control, as well as other control types.
You can also use a combination of control types in the cascading chain.
Essentially, after you select the value, or values, in the first control, the data returned from the rowsource of the second control is cascaded to show only values based on what is selected in the first control.
This is accomplished by creating the rowsource of the second control on the fly using the value from the fi rst combo box.
Selecting the value in the Filter/Search By combo box will show the available Document Type values in the Select A Filter Val combo box.
Adding and editing controls in Report Design view works exactly the same as adding and editing controls in Form Design view.
Here is a brief review:
- Selecting controls: Select a control by clicking it or by drawing (clicking and dragging) a rectangle that includes it. Selected controls display with handles.
- Select multiple controls: Select multiple controls by drawing a rectangle that includes them all or by selecting the first and then Shift-clicking additional controls.
- Moving controls: Move a control by selecting it then clicking and dragging when you see the pointer become a hand.
An open hand moves both paired controls, a hand with one finger out moves just the control its over (position the pointer over the top left handle).
- Resizing controls: Resize a control by clicking and dragging a handle until the outline is the size you want.
- Aligning controls: Align multiple controls by first selecting the control you want to align to and then selecting the controls you want to move.
Right-click any selected control and choose Align from the shortcut menu and then Left, Right, Top or Bottom of the edge of the control that you want to align.
- Adding controls: Add controls to the design by using the Field List or the Toolbox. You can click and drag a field from the field list to the report (this adds two controls: 1) a label and a 2) text box). Alternatively, select the type of control you want to add from the toolbox, then click and drag to create a rectangle on the report design.
- Edit control contents: Display a cursor in the control contents by selecting the control and then clicking the contents or pressing F2. When the edits are complete, press Enter.
- Formatting controls: To change the text formatting, select the control(s) and use the Formatting toolbar to select formatting. Use the Format Painter to copy formatting from one control to another.
Learn about the four types of report sections.