| re: Referring to a specific column in a subreport control from a textbox on the main report...
MLH wrote:[color=blue]
> I have a report and on it, a subreport control
>
> Main Report Name: rptInvoiceMain
> Sub Report Name: rptInvoiceSubReport
> SubReport Control Name: rptInvoiceSubReportCtl
>
> The subreport contains 2 fields - a text field where line items
> sold are listed and a currency field where the price per item
> is shown. The subreport control displays these two fields
> when the main report is opened.
>
> I have a textbox on the main report where I wish to display
> the total dollar amount of subreport column #2. Here is my
> controlsource property setting for that textbox:
>
> =Sum([Reports]![Orders]![rptInvoiceSubReportCtl].[Report].[ProcFee])
>
> I'm getting an error. What have I done wrong here?[/color]
Hi MLH,
Normally I would do my summing on the Sub report under a group header
such as the report footer (one the sub report). I would then let the
sub report grow as needed in the main report. The control that sums
column 2 would appear at the bottom of the sub report which would then
appear on the main report from the sub report.
You could also sum the column in a new control on the sub report under
the report footer, hide it there and reference the hidden control in
another control on the main report.
If you try to sum the column the way you are doing it you will get
#Error. You must sum the column in the sub report first. then you can
try any one of the sugestions above I gave you.
Have a great day
Cilla |