2003 sum in report footer and no data problem

2003 sum in report footer and no data problem

am 23.04.2008 08:03:14 von jeffp

Have a textbox in a report footer that sums data using Sum. That text box
value is used in a few calculations in the footer.

Trouble is, if the report has no data then the box simply shows #error and
all following calculations fail. Nz doesn't work.

In this case it is still valid for the report to show calculated values in
the footer even though the report actually contains no data. Values used
come from other places than the report data.

Is there anyway to get that text box with the Sum statement to show 0 rather
than #error?

Jeff

Re: 2003 sum in report footer and no data problem

am 23.04.2008 12:52:28 von Roger

On Apr 23, 12:03=A0am, "JeffP" wrote:
> Have a textbox in a report footer that sums data using Sum. That text box
> value is used in a few calculations in the footer.
>
> Trouble is, if the report has no data then the box simply shows #error and=

> all following calculations fail. Nz doesn't work.
>
> In this case it is still valid for the report to show calculated values in=

> the footer even though the report actually contains no data. Values used
> come from other places than the report data.
>
> Is there anyway to get that text box with the Sum statement to show 0 rath=
er
> than #error?
>
> Jeff

the form has an 'hasData' event
create a hidden text box in your footer
and add this to the event
txtNoData =3D 1
txtSum.visible =3D false ' hides #error

and use txtNoData in your calculations
iif(txtNoData,0,txtSum) + ......