Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IIF doing the only if all the time

Status
Not open for further replies.

misscrf

Technical User
Jun 7, 2004
1,344
US
I tried asking this with another similar thread, but no response, so sorry for the redundancy. I have like all my reports done, except this one. I have a report that shows an inventory for monitors. There is a field for workstation serial number in the table that feeds the report. I have the following expression to specify whether there is a workstation attatched to the monitor or not:

=IIf([WS] Is Not Null,"Yes","No")

Problem is, I only see "Yes" and I know that some should be saying no because there are records in the table/record source that have an empty field for the workstation.

What am I doing wrong please?
Thanks!
 
Hi!

Try this:

=IIf(Nz(Len([WS]),0)<>0,"Yes","No")

This will take care of cases where WS might be an empty string.

hth


Jeff Bridgham
bridgham@purdue.edu
 
Ok all. I kept working on this, and solved the problem all on my own! I put the expression in the control source/query and it worked! Woohoo!
 
Thanks for the suggestion! I will try that sometime to see the difference!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top