Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculation using data from subreport

Status
Not open for further replies.

JR2913

MIS
Sep 21, 2002
115
GB
Hello everyone

I'm sure this is quite straightforward.......

I want to carry out a calculation on a main report form with data derived from the report itself (Total Amount from Receipts) and from a subreport contained within it (which provides total costs chargeable to the individual). The calculation is to be done in a textbox at the foot of the main form. The current control source formula for the textbox is:

=Sum([Receipt Amount])-(rptsubAdultCharges.Sum([Cost]))

but this generates the dreaded #Name error when the report is run. I am sure it is to do with the syntax used for accessing the data from the subreport but, although I have tried different variations of the syntax, I still get the same error, even though I generated this formula using the Expression Builder.

If anyone could point me in the right direction to solve this problem I would be most grateful.

Thanks in advance

John R
 
OK ...... solved the problem, eventually by changing formula to:

=Sum([Receipt Amount])-([rptsubAdultCharges].[Report]![Sum Of Cost])

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top