UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Iif Isnull Still Returning Blank Field    
 
   
TheDude76
post 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?
Go to the top of the page
 
+
RAZMaddaz
post Apr 6 2012, 02:59 PM
Post #2

UtterAccess VIP
Posts: 6,170
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
Go to the top of the page
 
+
TheDude76
post Apr 6 2012, 03:12 PM
Post #3

UtterAccess Member
Posts: 42



Thanks RAZ. That worked!! (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
 
+
RAZMaddaz
post Apr 6 2012, 03:13 PM
Post #4

UtterAccess VIP
Posts: 6,170
From: Bethesda, MD USA



Awesome!!! Glad I could help!!!

RAZMaddaz
(IMG:style_emoticons/default/yw.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 22nd May 2013 - 02:13 PM