DLookUp, null value error

G

Guest

I'm using the formula =DLookUp("fieldname","[query name]"), which has been
working fine, but now I have a field in the query that is "0" and the report
displays "#Error". How do I get the report to display a "0" if there is no
value in the query? I'm using the "lookup" because this info comes from a
different query, than what the report is based on.
Thanks for you help.
 
T

Terry

Hi,

Try:
=nz(DLookUp("fieldname","[query name]"),0)

this will return a zero if the field is null.

Terry
 
G

Guest

Thanks Terry, I had tried that, but I missed the ",0" at the end.
It works now. Thanks.

Terry said:
Hi,

Try:
=nz(DLookUp("fieldname","[query name]"),0)

this will return a zero if the field is null.

Terry
-----Original Message-----
I'm using the formula =DLookUp("fieldname","[query name]"), which has been
working fine, but now I have a field in the query that is "0" and the report
displays "#Error". How do I get the report to display a "0" if there is no
value in the query? I'm using the "lookup" because this info comes from a
different query, than what the report is based on.
Thanks for you help.
.
 

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