Finding the sum of subreport passed values in the main report in ms Access

Viewed 35

I have a main report for orders and a subreport for payment installments for each order. I have been able to pass the values from the subreports to the main report using in a new textfield

IIf([rptPayments].[Report].[HasData],Nz([rptPayments].[Report].[txtTotalPayments],0),0)

I am having trouble with summing these values passed from the subreport so I can have total for all payments in the main report footer

2 Answers

One way to do it is to look for the Running sum property of the field and choose either of its options(Over Group), or(Over All)

Running sum

I would use a text box on your main report that displays the total from the subreport:

 Name:  txtTotLabsRunSum  
 Control Source: =srptCtrlName.Report.txtTotalControlOnSub  
 Running Sum: Over All  

Then add a text box to your main report's footer:

 Control Source: =txtTotLabsRunSum

Duane MS Access MVP

Related