My Assistant
![]() ![]() |
|
|
Apr 6 2012, 02:33 PM
Post
#1
|
|
|
UtterAccess Member Posts: 42 |
I have a query that I am using an IIf IsNull statement in 3 different fields. The issue that I am having is that even with the IIf IsNull, I am still receiving a blank field in the query results. Here is the sql for the query:
CODE SELECT qrySecurityYesNoNA.Site, qrySecurityYesNoNA.Date, IIf(IsNull(qrySecurityYesNoNA![Security Yes]),0,qrySecurityYesNoNA![Security Yes]) AS [Security Yes], IIf(IsNull(qrySecurityYesNoNA.[Security No]),0,qrySecurityYesNoNA.[Security No]) AS [Security No], IIf(IsNull(qrySecurityYesNoNA![Security N/A]),0,qrySecurityYesNoNA![Security N/A]) AS [Security N/A] FROM qrySecurityYesNoNA GROUP BY qrySecurityYesNoNA.Site, qrySecurityYesNoNA.Date, IIf(IsNull(qrySecurityYesNoNA![Security Yes]),0,qrySecurityYesNoNA![Security Yes]), IIf(IsNull(qrySecurityYesNoNA.[Security No]),0,qrySecurityYesNoNA.[Security No]), IIf(IsNull(qrySecurityYesNoNA![Security N/A]),0,qrySecurityYesNoNA![Security N/A]); Any ideas? |
|
|
|
Apr 6 2012, 02:59 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 6,171 From: Bethesda, MD USA |
Have you tried using the Len function instead? Here is a link to an explanation in the differences between the two.
Len function |
|
|
|
Apr 6 2012, 03:12 PM
Post
#3
|
|
|
UtterAccess Member Posts: 42 |
Thanks RAZ. That worked!! (IMG:style_emoticons/default/smile.gif)
|
|
|
|
Apr 6 2012, 03:13 PM
Post
#4
|
|
|
UtterAccess VIP Posts: 6,171 From: Bethesda, MD USA |
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 25th May 2013 - 11:13 PM |