Grand totals from subrpt

F

Fay Yocum

I have a report that reports on job injuries. The main form gives the
information about the injury. There is a subreport called
subrptIncidentCosts where costs are reported with individual and a grand
total for the specific injury treatments.

Using the builder I got the formula in a unbound text box in the report
footer
=(Sum([frmIncidentCosts].[Report]![txtCostsGrandTotalSum]))

When I run it I get a parameter message box with
"frmIncidentCosts.Report!txtCostsGrandTotalSum" in the top of the form.

What am I doing wrong. Thank you. Fay
 
A

Arvin Meyer

Try the following syntax:

=Sum(Reports!MainReportName!SubReportName.Report!txtCostsGrandTotalSum

where txtCostsGrandTotalSum is the name of a textbox in the subreport's
footer. You may also want to wrap this inside a function which handles Null
conditions in the subreport, as they are not correctly handled with
IIf(IsNull()) or NZ(). Have a look at the following:

http://www.mvps.org/access/reports/rpt0007.htm

or

http://www.mvps.org/access/forms/frm0022.htm
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Top