Convert #Error to number in report run from blank query

G

Guest

I have a problem and any help would be appreciated.
I have a report built from a query that may or may not return any data. I am
running a total of one of the fields at the footer and this returns #Error
when I open the report.
I would like this to show 0 if there is no information returned by the
query. I have tried the following. Some of the expressions I have tried are
=IIf(Sum([pnum]) Is Null,"0",Sum([pnum]))
=IIf(IsError([pnum])="0","Empty",Sum([pnum]))
=IIf(IsEmpty([pnum])="0","Empty",Sum([pnum]))

All return #Error if the query does not return any data.

Thanks
 

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

Top