×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Multi-selection dropdown list does not work

Multi-selection dropdown list does not work

Multi-selection dropdown list does not work

(OP)
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.


CODE -->

<select multiple NAME="Rec_Id">
<%
Do While Not rs.EOF
%>

	<%if rs("AA")=1 Then%>
		<option value="<%=rs("AA")%>"> 
		<%V_AA="&nbsp;AA &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "%>

	<%else%>
		<option style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color:red;"  value="<%=rs("AA")%>">
		<%V_AA="&nbsp;AA &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "%>
	<%end if%>
	
	<%if rs("BB")=1 Then%>
		<option value="<%=rs("BB")%>">  
		<%V_BB=("BB &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ")%>
	<%else%>
		<option style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; color:red;" value="<%=rs("BB")%>">  
		<%V_BB=("BB &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ")%>
	<%end if%>
	
<%response.write V_AA&" "&V_BB&"  "&rs("Name")%> 
</option>

<%
rs.MoveNext
Loop
%>
</select> 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close