Microsoft Office Tutorials and References
In Depth Information
Copying Forms to Reports
Figure 1-16 shows the property sheet for a subreport control with the
Data tab selected. (While you’ve got the property sheet displayed, you
can adjust the format properties, too.) The Source Object property
contains the name of the subreport that the control displays.
9. Check the Link Child Fields and Link Master Fields
properties on the Data tab of the property sheet.
These properties contain the names of the fields that relate the main
and subreports. The Link Master Fields property should contain
the name of the field in the record source of the main report that relates
to a field in the subreport. The Link Child Fields property contains
the name of the matching field in the record source of the subreport.
Figure 1-16:
The
properties of
a subreport
control link
the records
in the
subreport
with those
in the main
report.
Printing information from a
subreport on the main report
Just as you can display totals from a subform on a main form, you can print
totals from a subreport on the main report. (See Book IV, Chapter 4 for
details on creating a control on the main report to display a total from a
subreport.)
When you enter the expression in the text box control on the main report,
use this format:
= [ subreport control name ].Report![ total control ]
Replace subreport control name with the name of the subreport
control. Replace total control with the name of the text box control in the
subreport that displays the total. The following example expression may
display the total extended price (price × quantity) for the records in the report
that display in the Order Detail Subreport subreport control:
= [Order Detail Subreport].Report![Total Ext Price]
Search JabSto ::




Custom Search