Subreport total error when no data

  • Thread starter Thread starter SAC
  • Start date Start date
S

SAC

I have a main report - rptInvoices

and a sub report - rptInvoicesBulk subreport

On the subform I have a control which sums all the extended prices, called
txtSumPriceExt

On the main form I have a control that uses the txtSumPriceExt on the
subform as it's data source.

The problem arises when I have no data for the subform so the control on the
main form errors.

How can I fix this?

Thanks for your help.
 
You should be able to use a text box in the main report with a control source
like:
=IIf([rptInvoicesBulk subreport].Report.HasData, [rptInvoicesBulk
subreport].Report!txtSumPriceExt, 0)
 
Thanks Duane!!

Duane Hookom said:
You should be able to use a text box in the main report with a control
source
like:
=IIf([rptInvoicesBulk subreport].Report.HasData, [rptInvoicesBulk
subreport].Report!txtSumPriceExt, 0)

--
Duane Hookom
Microsoft Access MVP


SAC said:
I have a main report - rptInvoices

and a sub report - rptInvoicesBulk subreport

On the subform I have a control which sums all the extended prices,
called
txtSumPriceExt

On the main form I have a control that uses the txtSumPriceExt on the
subform as it's data source.

The problem arises when I have no data for the subform so the control on
the
main form errors.

How can I fix this?

Thanks for your help.
 
Back
Top