Seamus Campbell wrote: > Many thanks - worked perfectly > > Seamus > Glad that helped, and I hope I don't confuse matters, but I wanted to point out another method you could use...
Your first query could be changed to something like: <CFQUERY NAME="get_parent_categories" DATASOURCE="#request.DSN_main#"> SELECT a.parent_category_id, a.parent_category, b.category_id AS selectthis FROM tbl_parent_category a LEFT JOIN tbl_category_parent_category b ON a.parent_category_id = b.parent_category_id AND b.category_id = #URL.category_id#; </CFQUERY> Eliminating the need for the second query and the valuelist function, then your cfoutput would be something like... <cfoutput query="get_parent_categories"> <option value="#parent_category_id#"<CFIF len(selectthis)> SELECTED</CFIF>>#get parent_categories.parent_category#</option> </cfoutput> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255869 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

