Access 2016 Advanced

Access 2016

Lesson 1 - Using Subforms/Subreports

You may want to include a total contained in a subform/subreport in the main form/report total. For example, an Orders form may contain a control for shipping charges. The information in the Product subform may include a total, such as the total cost of all the products ordered. You can display this subform total on the main form so that you can add the shipping charges to this total to create a grand total. This option is performed by adding a control to the main form/report, which refers to the desired subform/subreport total control, to display the information.

The expression in the main form/report control that refers to the subform/subreport control defines the name of the subform/subreport and the name of the subform/subreport control being used in the following format:

= [ Name of the Subform/Subreport ]![ Name of the Subform/Subreport Control ]

NOTE Display a subreport total in the main report using the same methods you use to display a subform total.

Procedures

1. Open the form or report in Design view.

2. On the Design tab in the Controls group select the Text Box button . 3. Click in the form or report where you want to insert the control. 4. Select the label field. 5. Select the text in the label field. 6. Type a label in the label field. 7. Select the text box. 8. Press [F4] to open the property sheet. 9. Select the Data tab. 10. Type the expression that refers to the desired subform/subreport control. 11. Press [F4] to close the property sheet.

Step-by-Step

Display a subform/subreport total in the main form/report.

OFFICEPRO, Inc.

Page 11

Made with FlippingBook - Online magazine maker