if it is null how not to get the #error

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hi all,

Have a report that works until even thing balances out and the value comes
to zero. When the value is zero, or null I get a #error on my report. How
can I get this statement to show a Zero, or something else if it is zero?
This statement works as long as there is a value less or greater then "0", or
null.

="Summary for " & "'Status' = " & " " & [Status] & " (" & Count(*) & " " &
IIf(Count(*)=1,"detail record","detail records") & ")"
 
Mark,
I'm assuming it's the Count(*) that goes to Null...
Your calc should still work if Count(*) = 0
Using the NG function...
Try...
= "Summary for 'Status' = " & [Status] & " (" & NZ(Count(*),0)
& IIf(NZ(Count(*),0)=1," detail record)"," detail records)")

Didn't have time to test, but that should do it...
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
Back
Top