How about

<cfloop from="1" to="12000" index="ii">
        <cfset s_ii = right("0000"&ii,5)>
        <option value="#s_ii#" <cfif qry.xox eq s_ii>selected="selected"</cfif> 
#s_ii#</option>
</cfloop>

Mik


At 10:06 AM 2/22/2007, you wrote:
>Select currently looks like this:
>
><select name=xox">
>  <option value="00"
>          <cfif qry.xox EQ 00> selected="selected"</cfif>>00</option>
>  <option value="01"
>          <cfif qry.xox EQ 01> selected="selected"</cfif>>01</option>
>  <option value="02"
>          <cfif qry.xox EQ 02> selected="selected"</cfif>>02</option>
>
>  ...up to whatever number
></select>
>
>Gotta be a better way using a loop, and if the numbers were simply 1 
>through whatever, no problem. It's keeping the leading zero and starting 
>with "00" and then "01", "02", ... , whatever that's making me scratch 
>my head.
>
>The database field is a varCHAR so no problem there.
>
>Ideas?
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270457
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to