if it is null how not to get the #error



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

="Summary for " & "'Status' = " & " " & [Status] & " (" & Count(*) & " " &
IIf(Count(*)=1,"detail record","detail records") & ")"

Al Campagna

I'm assuming it's the Count(*) that goes to Null...
Your calc should still work if Count(*) = 0
Using the NG function...
= "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...
Al Campagna
Microsoft Access MVP

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question