 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Access 2007 IIF statement in query criteria</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/access-2007-iif-statement-in-query-criteria/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/access-2007-iif-statement-in-query-criteria/</link>
	<description></description>
	<lastBuildDate>Sun, 26 May 2013 01:40:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/access-2007-iif-statement-in-query-criteria/#comment-70400</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Sat, 14 Nov 2009 00:32:31 +0000</pubDate>
		<guid isPermaLink="false">#comment-70400</guid>
		<description><![CDATA[Can you modify the query&#039;s SQL to try something like this ?

&lt;pre&gt;... AND (NZ(WorkPacks.ConfigData)=IIf([Forms]![Main Form]![chkConfigNote]=True,[ConfigData],NZ([ConfigData]))) AND...&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Can you modify the query&#8217;s SQL to try something like this ?</p>
<pre>... AND (NZ(WorkPacks.ConfigData)=IIf([Forms]![Main Form]![chkConfigNote]=True,[ConfigData],NZ([ConfigData]))) AND...</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: scubacy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/access-2007-iif-statement-in-query-criteria/#comment-70390</link>
		<dc:creator>scubacy</dc:creator>
		<pubDate>Fri, 13 Nov 2009 21:08:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-70390</guid>
		<description><![CDATA[I thought the second apostrophe was the &quot;Else&quot;. IIF(statement, do this if its true, do this if its false (Else))
Maybe I should restate the question; IIF(chkbox=true,show only memo fields with text, else show all memo fields) What I have so far will filter the memo fields with text but will not show all if unchecked
IIf([Forms]![Main Form]![chkConfigNote]=True,[WorkPacks].[ConfigData],Not sure what to put here to show all) &quot;*&quot; didnt work

Thanks again.]]></description>
		<content:encoded><![CDATA[<p>I thought the second apostrophe was the &#8220;Else&#8221;. IIF(statement, do this if its true, do this if its false (Else))<br />
Maybe I should restate the question; IIF(chkbox=true,show only memo fields with text, else show all memo fields) What I have so far will filter the memo fields with text but will not show all if unchecked<br />
IIf([Forms]![Main Form]![chkConfigNote]=True,[WorkPacks].[ConfigData],Not sure what to put here to show all) &#8220;*&#8221; didnt work</p>
<p>Thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scubacy</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/access-2007-iif-statement-in-query-criteria/#comment-70321</link>
		<dc:creator>scubacy</dc:creator>
		<pubDate>Thu, 12 Nov 2009 15:57:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-70321</guid>
		<description><![CDATA[Below is the  SQL that the query wizard produced. 
I have 18 fields and I&#039;m filtering most of them with a checkbox against a &quot;yes/no&quot; field so those are working. But one db field is a memo type that I am filtering with a form checkbox and that&#039;s where I&#039;m having the problem. 

The &gt;&quot;&quot; isn&#039;t working in the statement, however the IIF([forms].[Main Form].[chkConfigData]=True,[WorkPacks].[ConfigData], &quot;*&quot;) works to filter only memo fields with text. The false portion of the statement should show all fields with or without text, but it shows no records at all.. 

Thanks for your help!

SELECT *
FROM WorkPacks
WHERE (((WorkPacks.Area)=[Forms].[Main Form].[cboFCOArea]) AND ((WorkPacks.WorkPackage)=IIf([Forms]![Main Form]![cboFCOWP]&gt;0,[Forms]![Main Form]![cboFCOWP],[WorkPacks].[WorkPackage])) AND ((WorkPacks.ConfigData)=IIf([Forms]![Main Form]![chkConfigNote]=True,[ConfigData],&quot;*&quot;)) AND ((WorkPacks.Started)=[Forms].[Main Form].[chkStart]) AND ((WorkPacks.Configured)=[Forms].[Main Form].[chkConfig]) AND ((WorkPacks.QA)=[Forms].[Main Form].[chkQA]) AND ((WorkPacks.FCODocBuilt)=[Forms].[Main Form].[chkDocBuilt]) AND ((WorkPacks.Screenshot)=[Forms].[Main Form].[chkScreenshot]) AND ((WorkPacks.LoadedEPKS)=[Forms].[Main Form].[chkLoaded]) AND ((WorkPacks.SlopeReceipt)=[Forms].[Main Form].[chkReceipt]) AND ((WorkPacks.SlopeFCOStart)=[Forms].[Main Form].[chkFCOStart]) AND ((WorkPacks.SlopeFCOComplete)=[Forms].[Main Form].[chkSlopeFCOComplete]) AND ((WorkPacks.HMITest)=[Forms].[Main Form].[cboHMITest]))
ORDER BY WorkPacks.DisplayName;]]></description>
		<content:encoded><![CDATA[<p>Below is the  SQL that the query wizard produced.<br />
I have 18 fields and I&#8217;m filtering most of them with a checkbox against a &#8220;yes/no&#8221; field so those are working. But one db field is a memo type that I am filtering with a form checkbox and that&#8217;s where I&#8217;m having the problem. </p>
<p>The &gt;&#8221;" isn&#8217;t working in the statement, however the IIF([forms].[Main Form].[chkConfigData]=True,[WorkPacks].[ConfigData], &#8220;*&#8221;) works to filter only memo fields with text. The false portion of the statement should show all fields with or without text, but it shows no records at all.. </p>
<p>Thanks for your help!</p>
<p>SELECT *<br />
FROM WorkPacks<br />
WHERE (((WorkPacks.Area)=[Forms].[Main Form].[cboFCOArea]) AND ((WorkPacks.WorkPackage)=IIf([Forms]![Main Form]![cboFCOWP]&gt;0,[Forms]![Main Form]![cboFCOWP],[WorkPacks].[WorkPackage])) AND ((WorkPacks.ConfigData)=IIf([Forms]![Main Form]![chkConfigNote]=True,[ConfigData],&#8221;*&#8221;)) AND ((WorkPacks.Started)=[Forms].[Main Form].[chkStart]) AND ((WorkPacks.Configured)=[Forms].[Main Form].[chkConfig]) AND ((WorkPacks.QA)=[Forms].[Main Form].[chkQA]) AND ((WorkPacks.FCODocBuilt)=[Forms].[Main Form].[chkDocBuilt]) AND ((WorkPacks.Screenshot)=[Forms].[Main Form].[chkScreenshot]) AND ((WorkPacks.LoadedEPKS)=[Forms].[Main Form].[chkLoaded]) AND ((WorkPacks.SlopeReceipt)=[Forms].[Main Form].[chkReceipt]) AND ((WorkPacks.SlopeFCOStart)=[Forms].[Main Form].[chkFCOStart]) AND ((WorkPacks.SlopeFCOComplete)=[Forms].[Main Form].[chkSlopeFCOComplete]) AND ((WorkPacks.HMITest)=[Forms].[Main Form].[cboHMITest]))<br />
ORDER BY WorkPacks.DisplayName;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/access-2007-iif-statement-in-query-criteria/#comment-70314</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Thu, 12 Nov 2009 14:45:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-70314</guid>
		<description><![CDATA[Could you please post the SQL of your query, to see where you are using that code ?

I think you could use the NZ or LEN functions, but we would need to see the complete query to make a suggestion.]]></description>
		<content:encoded><![CDATA[<p>Could you please post the SQL of your query, to see where you are using that code ?</p>
<p>I think you could use the NZ or LEN functions, but we would need to see the complete query to make a suggestion.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/9 queries in 0.012 seconds using memcached
Object Caching 310/313 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-26 02:06:51 -->