I hope this is more clear... The solution you gave for "Displaying the first value from cfoutput" was great, thanks. Now I realise that I need the variable to hold the default value from the database on the first pass, but when the user selects a value from the list box I want that to become the current value.
<cfquery name="userinfo" datasource="db1"> SELECT DomainName FROM Domains</cfquery> <cfset variables.CurrentDomain = userinfo.DomainName[1] /> <cfoutput>#variables.CurrentDomain#</cfoutput> <FORM action="admin.cfm" method="post"> <SELECT name="listboxdomain"> <cfoutput query="userinfo"> <OPTION value="#DomainName#">#DomainName# </CFOUTPUT> </SELECT> <input name="Go" type="submit"> </FORM> The template is named "admin.cfm", so I am having the form call itself. How can I detect if it the first time the template has been called, so that I can assign the var the results of the db code on the first pass, and the value of the listbox on the other passes? Rodger ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:193007 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54