DLookup and 0

G

Guest

I am using DLookup on a report. If the value of DLookup is 0, how can I
display 0 on the report? Can I combine DLookup with Iif? If so, what would be
the syntax?

Thanks!
 
C

Carl Rapson

Do you m,ean Null instead of 0? If DLookUp returns a zero, you should be
able to display it just fine. If DLookUp returns Null, you will need to use
the Nz function to replace the Null with something else:

Nz(DLookUp("","",""),0)

Carl Rapson
 
G

Guest

Thank you, Carl. This worked perfectly.

Any ideas why DLoopUp would not display a zero?

This is just a small example of what has turned out to be one, big, ugly
report which I know could have been written eloquently. It is terrible and
confusing to follow and way bigger than it has to be. Can you point me in any
direction, i.e., books, on line courses, etc., to learn ways to be more
sophisticated with Access?

Thanks again.
 
C

Carl Rapson

DLookUp returns Null if it can't find what you tell it to look up. That
makes sense, because Null is just that - nothing.

As far as books etc., I can't help you there. I have no books myself, and I
learn mostly by just trying and then asking questions in these newsgroups.
Maybe someone else has some good book/online course suggestions.

Carl Rapson
 

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

Similar Threads


Top