I have an edit page and i want to select the value of the combo box depending on the id on another the table.this is the code for the combo box


<%
Dim sql6,rs6
sql2= "SELECT * FROM tblusers "
Set rs6= Server.CreateObject("ADODB.Recordset")
rs6.Open sql2, Conn, 1,3
%>
<select name="cbousers">
<%
While not rs6.EOF
%>
<option value="<%=rs6("userid")%>"><%=rs6("username")%></option>
<%
rs6.MoveNext
Wend

Set rs6= nothing
%>
</select>

the selected value will depend on <%=rs("uid")%> which is also a user id that is located in the data table. the rs6 is the table for the users.