I have a dynamic drop down that is being populated by a table in an access 2000 database. The problem is that the drop-down box will only initially select the cities that start with A if I sort decending. When I try and sort Ascending it starts at Zion. How can I shift the cities starting with A to the top and initially select it in the drop down box?
Here is an example of me creating this with Abbott Park selected first but I must sort it descending to do it.
http://146.145.180.7/LimoCorpChicago/default.aspCODE
[b]SELECT STATEMENT[/b]
<%
Dim rsZones
Dim rsZones_numRows
Set rsZones = Server.CreateObject("ADODB.Recordset")
rsZones.ActiveConnection = MM_LimoCorp_STRING
rsZones.Source = "SELECT City FROM Zones ORDER BY City DESC"
rsZones.CursorType = 0
rsZones.CursorLocation = 2
rsZones.LockType = 1
rsZones.Open()
rsZones_numRows = 0
%>
[b]DROP DOWN BOX[/b]
<p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Destination:</strong><br />
<select name="Destination" id="Destination">
<%
While (NOT rsZones.EOF)
%>
<option value="<%=(rsZones.Fields.Item("City").Value)%>" <%If (Not isNull((rsZones.Fields.Item("City").Value))) Then If (CStr(rsZones.Fields.Item("City").Value) = CStr((rsZones.Fields.Item("City").Value))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(rsZones.Fields.Item("City").Value)%></option>
<%
rsZones.MoveNext()
Wend
If (rsZones.CursorType > 0) Then
rsZones.MoveFirst
Else
rsZones.Requery
End If
%>
</select>
</font></p>