I have a couple list boxes on a form that query a database table for certain values to display in the box. My problem is that the users are able to select multiple options in these list boxes and then save the form to the database. When they come back into the form to make updates the list boxes are only highlighting the one of the options in the list box and i need it to highlight all of the options the user selected.
Here is the code for one of these boxes.
Here is the code for one of these boxes.
Code:
<td>Analysis Type</td>
<td><select name=ANALYSIS_TYPE size=4 multiple style="width:280px;height:380px;">
<%
sql = "SELECT APP_LIST_VALUE_DESC from TICKER_APP_LIST_VALUE WHERE APP_LIST_ID = 4 ORDER BY APP_LIST_VALUE ASC "
set rs = server.CreateObject("adodb.recordset")
rs.Open sql, conn
while not rs.eof
Response.Write("<option value='"&rs(0)&"'")
if cstr(ANALYSIS_TYPE_UP)=cstr(rs(0)) then
Response.Write (" selected ")
end if
Response.Write(">"&rs(0))
rs.movenext
wend
rs.close
set rs = nothing%>
</select>
Comment