Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Convert a sum in a report from a null value to zero

91 views
Skip to first unread message

Cruisemate

unread,
Apr 26, 2005, 12:35:32 PM4/26/05
to
I created a report that utilized the sum function. however if there is
a result that is 0 is doesn't display 0, it shows as null (blank) how
can I get it to display the 0's in my report when there is no data that
was summed?

Larry Linson

unread,
Apr 26, 2005, 2:29:49 PM4/26/05
to
"Cruisemate" wrote

The NZ function converts a Null to Zero; if an actual zero result is
displaying as blank, you should use the Format property of the Control and
make certain it does not have an entry for 0 that shows blank.

Larry Linson
Microsoft Access MVP


Cruisemate

unread,
Apr 26, 2005, 4:27:57 PM4/26/05
to
I"m not sure how to use the NZ function within the report. The format
property does not have an entry for 0 that shows blank.

Larry Linson

unread,
Apr 26, 2005, 10:45:45 PM4/26/05
to
"Cruisemate" wrote

I could assume from your question that you have a Control on the Report with
a ControlSource of =Sum([SomeField]). It would be helpful if you'd include a
bit more detail with your question (but not enough to bury us in detail
<GRIN>).

If the values in [SomeField] are Null, then nothing will show. You could try
using as ControlSource the expression =
IIF(IsNull(Sum([SomeField]),"0",Sum([SomeField])) -- in a simple test case
where there were no "matching order detail records", thus giving a Null
summation, it worked for me.

Be sure to rename Controls so they do not have identical names to the
underlying Fields, if either are used in calculations.

0 new messages