From a database tableA with fields: AA (numeric 1 or 0) and BB (1 or 0) and Name, I am trying to create a drop-down list with multiple selection options of the fields AA and BB separately.
So I do not only want to make a selection of the complete record(s) but - if possible - also a separate selection of the fields AA or BB (for example a selection of only BB1 and AA15 and BB27 ...).
AA1 BB1 Name 1
AA2 BB2 Name 2
AA3 BB3 Name 3
...
AA50 BB50 Name 50
Thanks for tips to make the code below workable for this.
So I do not only want to make a selection of the complete record(s) but - if possible - also a separate selection of the fields AA or BB (for example a selection of only BB1 and AA15 and BB27 ...).
AA1 BB1 Name 1
AA2 BB2 Name 2
AA3 BB3 Name 3
...
AA50 BB50 Name 50
Thanks for tips to make the code below workable for this.
Code:
<select multiple NAME="Rec_Id">
<%
Do While Not rs.EOF
%>
<%if rs("AA")=1 Then%>
<option value="<%=rs("AA")%>">
<%V_AA=" AA "%>
<%else%>
<option style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color:red;" value="<%=rs("AA")%>">
<%V_AA=" AA "%>
<%end if%>
<%if rs("BB")=1 Then%>
<option value="<%=rs("BB")%>">
<%V_BB=("BB ")%>
<%else%>
<option style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color:red;" value="<%=rs("BB")%>">
<%V_BB=("BB ")%>
<%end if%>
<%response.write V_AA&" "&V_BB&" "&rs("Name")%>
</option>
<%
rs.MoveNext
Loop
%>
</select>