DLookUp, null value error

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
Hi,

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

this will return a zero if the field is null.

Terry
 
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.
.
 
Back
Top