You could populate the text box that shows the total by using the On Format
event of the section in which it exists eg.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim total as Currency
If Me![invoicesubsundriesrpt].[Report].HasData then
total = Me![invoicesubsundriesrpt].[Report]![totsuns]
End If
Me![txtTotal] = total
End Sub
Using the HasData test avoids an error if the [totsuns] text box does not
exist.
HTH,
Ian.
"David B" <da***@marleycotenospam.fsnet.co.uk> wrote in message
news:br**********@newsg3.svr.pol.co.uk...
I have a report with 2 sub reports on it. I am grabbing 2 totals from
the sub reports for the main report footer. If there is data in each sub report
no problem. However if one contains nothing I get error. I have been trying
to use Nz to force a zero without success.
This is what I have in the control source of a text box on the main report
=Nz([invoicesubsundriesrpt].[Report]![totsuns])
Any thoughts ?
David B
Hexham UK