Solved

IIF and Nz

Posted on 2015-01-04
6
114 Views
Last Modified: 2015-01-04
Experts, I have a table with a field named [Completed].  This table is an import from Excel.  The field value is either Yes, No or "".    If [Completed] is null or "" then the return should be "No".  

What do you see as wrong in the below statement?  I seem to always get "Yes" for any value in  [Completed] whether it is Yes or "No" or ""

Completed_Group: IIf(Nz([Completed],""=""),"No","Yes")
0
Comment
Question by:pdvsa
6 Comments
 
LVL 39

Accepted Solution

by:
als315 earned 500 total points
Comment Utility
Try this code:
IIf(Nz([Completed],"") ="","No",[Completed])
0
 
LVL 22

Expert Comment

by:Kelvin Sparks
Comment Utility
Try
IIf(Nz([Completed], """"), "No", "Yes")

You were trying to set to "No" any thing that was "=". Not sure where you got = from?

Kelvin
0
 
LVL 18

Expert Comment

by:bonjour-aut
Comment Utility
this should work:
Completed_Group: IIf(Nz([Completed]=""),"No",[Completed])
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 18

Expert Comment

by:bonjour-aut
Comment Utility
Explanation: Nz([Completed] will give "" in case the field is "" or Null
0
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
try

Completed_Group: IIf([Completed] & ""="","No", [Completed])

this will give you
No for Null
No for No
Yes for Yes
0
 

Author Closing Comment

by:pdvsa
Comment Utility
that was it.  thank you.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now