I use IsNumeric function is such cases. On the sub report, there could a box
called txtCountLabour
On the main form, I would have something like
=IIF(IsNumeric(Reports!rptLabour!txtCountLabour),
Reports!rptLabour!txtCountLabour,0)
If there is no data in the sub report, a 0 will be displayed instead.
HTH
Vayse
"Robert" <none@none.comwrote in message
news:L3RWg.64246$WA2.3456@fe06.news.easynews.com.. .
Quote:
Arggg... I have a report that calls up numbers from two subreports. One
deals with project labor the other expenses. on each subreport, there is a
calc fields that sums cost and price. the main report then references
those fields to do more calculations. I.e. add LaborCost from labor
subreport and ExpensesCost from expenses subreport. There are a number of
these calculations and they work as expected except when one of the
subreports has no data, i.e. there were no expenses. I have a form that
displays this information and I got around the #error that access kept
giving me by using an Iif statement to count the records first and enter 0
if the count was 0. This works on the form but not the report. So, on my
report if one of the subreports does not have any records, the subreport
does not get displayed thus #error! any thoughts?
>
|