It looks like those are mutually exclusive, aren't they? If NOT structKeyExists(posts, "query"), then posts.query will not exist and therefore will not have a recordCount at all. You could just take a different approach to the loop:
<cfset loopOK = true /> <cfif structKeyExists(posts, "query")> <cfset loopOK = false /> </cfif> <cfloop condition="#loopOK#"> <!--- grab your query and add it to the 'posts' struct and check the recordCount ---> <cfif posts.query.recordCount lt 10> <cfset loopOK = false /> </cfif> </cfloop> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317388 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

