Don't embed it... if it's just a form then there is just one record for the one query so why embed? meaning do this. I have done a ton of forms with query filled select boxes this way. never have a problem. === START CODE SAMPLE === <cfquery name="outsideQuery" datasource="dsn"> select * from tblA </cfquery>
<cfquery name="embeddedQuery" datasource="dsn"> select * from tblB </cfquery> <form action="actionPage.cfm" method="post"> <cfoutput query="outsideQuery"> Member Name: <input type="text" name="nameFld" value="#nameFld#"> </cfoutput> Member Level: <!------ Need the dropdown box here -----> <select name="this"> <cfoutput query="embeddedQuery"> <option value="#fldID#">#fldName# </cfoutput> **** you can also do ***** <cfoutput query="embeddedQuery"> <option value="#fldID#" <CFIF outsidequery.fldid EQ embeddedquery.fldid>SELECTED</CFIF>>#fldName# </cfoutput> </select> Then if you have more fields just open the other output again. <CFOUTPUT query="outsideQuery"> ETC ETC ETC </CFOUTPUT> </form> -----Original Message----- From: Paul Sinclair [mailto:[EMAIL PROTECTED]] Sent: Friday, December 07, 2001 5:18 PM To: CF-Talk Subject: No <cfquery output> within <cfquery output> - but I need to I am setting up a form page that requires a drop down selection box. The dropdown box is generated dynamically in a <cfoutput query> section. But the dropdown box is itself to be inserted within another <cfoutput query> section of the page. I've tried using <cfset> above the first <cfoutput> section to make a variable that I can embed with the second <cfoutput> section. The problem with that is I can't do a <cfoutput> within the <cfset> tag to set up the variable (at least I don't think I can.) What I want to do is something like this: === START CODE SAMPLE === <cfquery name="outsideQuery" datasource="dsn"> select * from tblA </cfquery> <cfquery name="embeddedQuery" datasource="dsn"> select * from tblB </cfquery> <form action="actionPage.cfm" method="post"> <cfoutput query="outsideQuery"> Member Name: <input type="text" name="nameFld" value="#nameFld#"> Member Level: <!------ Need the dropdown box here -----> <select name="this"> <cfoutput query="embeddedQuery"> <option value="#fldID#">#fldName# </cfoutput> </select> </cfoutput> </form> === END CODE SAMPLE === Any ideas how to cram the dropdown box in there? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

