Using an IIF with a DLOOKUP?

G

Gus Chuch

Has anyone ever use a DLOOKUP on a report using a IIF to print an message if
the DLOOKUP comes back with a NULL value.
Would it look something like this
=IIF(Expr,Truepart,Falsepart)

if TRUE output the dlookup to the reports textbox
if FALSE print some text like “NO RECORD FOR THIS field “

=IIF(DLOOKUP(Expr,Domain,Criteria),<> NULL “print the dlookupâ€, NULL “print
no record’)
can this be done?
 
O

Ofer

Try and use the Nz function to replace the null with a different value

=Nz(DLOOKUP(Expr,Domain,Criteria),“print no record’)
 
G

Gus Chuch

it works thanks!
--
thank You


Ofer said:
Try and use the Nz function to replace the null with a different value

=Nz(DLOOKUP(Expr,Domain,Criteria),“print no record’)
 

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