You can do:

<select name="disprepstat" size="1">
        <cfoutput query="disprepstatus">
        <option value="#disprepID#" <cfif the_current_value eq disprepID>
selected </cfif>>#Trim(disprepstatus.disprepstatus)#</option>
      </cfoutput>              
</select>

Where 'the_current_value' is the value in your record.

Phillip

-----Original Message-----
From: "Hawkes [mailto:"Hawkes] 
Sent: Thursday, February 13, 2003 10:00 AM
To: CF-Talk
Subject: Default List/Menu


I have this query:

<cfquery name="disprepstatus" datasource="SPMS">
SELECT  *
FROM            disprep
</cfquery>


I'm using this List/Menu drop-down:

<select name="disprepstat" size="1">
              <cfoutput query="disprepstatus">
                <option
value="#disprepstatus.disprepID#">#Trim(disprepstatus.disprepstatus)#</optio
n>
              </cfoutput>              
              </select>


How can I get the value already in the record to come up?  It's currently
defaulting to 1 and I have up to 60 different choices.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to