Using an IIF with a DLOOKUP?

G

Guest

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?
 
G

Guest

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

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

Guest

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

DLookup different values 1
IIf statement 9
Help with IIF / DLookup formula 6
Sub report message 18
Report asks for formatted/default printer 2
dlookup problem 1
Criteria, DLookup, and IIF 1
Four Report Problems 25

Top