You've already got the solution, but here's a bit of explanation as well. The reason the original was giving unexpected answers is this block:
<cfif #getevents.StartDate# eq #getevents.EndDate#> When that runs outside of a query loop or query output, then it is pulling the first query record, so the variables get set only once and only based on the nature of that first record in the query. HTH, Jason ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:315191 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

