Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox

Status
Not open for further replies.

aladin1973

Programmer
Aug 22, 2001
3
FR
Ok, Thank you. So, I have integrated your code in my program, but it doesn't works yet as I would like : now, I would like to activate another one Combobox (of Messages) in fonction of the item that I select in the first Combobox. Please find here my code for you see that.

<td width=&quot;192&quot; height=&quot;80&quot; colspan=&quot;2&quot; rowspan=&quot;1&quot; valign=&quot;top&quot; align=&quot;left&quot; xpos=&quot;176&quot;><select name=&quot;selectName&quot; size=&quot;7&quot;>
<%
Dim db,rs
Set db = Server.CreateObject(&quot;ADODB.Connection&quot;)
Set rs = Server.CreateObject(&quot;ADODB.Recordset&quot;)
db.Open &quot;DBQ=&quot; & Server.MapPath(&quot;messages.mdb&quot;)& &quot;;Driver={Microsoft Access Driver (*.mdb)};&quot;
Set rs = db.Execute(&quot;SELECT Nom_Afficheur from Table_Afficheurs&quot;)
Do while Not rs.EOF
Response.Write(&quot;<OPTION VALUE=&quot; & rs(&quot;Nom_Afficheur&quot;)& &quot;>&quot; & rs(&quot;Nom_Afficheur&quot;) & &quot;</OPTION>&quot;)
rs.MoveNext
Loop
rs.Close
db.Close %>
</select></td>
<td width=&quot;32&quot; height=&quot;80&quot;></td>
<td width=&quot;192&quot; height=&quot;80&quot; colspan=&quot;4&quot; rowspan=&quot;1&quot; valign=&quot;top&quot; align=&quot;left&quot; xpos=&quot;400&quot;><select name=&quot;selectNameMessages&quot; size=&quot;4&quot; multiple>
<%
Dim sSelect
sSelect = Request.Form(&quot;selectName&quot;)
Dim db2,rs2
Set db2 = Server.CreateObject(&quot;ADODB.Connection&quot;)
Set rs2 = Server.CreateObject(&quot;ADODB.Recordset&quot;)
db2.Open &quot;DBQ=&quot; & Server.MapPath(&quot;messages.mdb&quot;)& &quot;;Driver={Microsoft Access Driver (*.mdb)};&quot;
Set rs2 = db.Execute(&quot;SELECT Contenu_Message from Table_Afficheurs_Sélectionnés WHERE Nom_Afficheur = &quot; & SQLstr(sSelect))
Do while Not rs2.EOF
Response.Write(&quot;<OPTION VALUE=&quot; & rs2(&quot;Contenu_Message&quot;)& &quot;>&quot; & rs2(&quot;Contenu_Message&quot;) & &quot;</OPTION>&quot;)
rs2.MoveNext
Loop
rs.Close
db.Close
%>
</select></td>

Thanks you again.
Aladin1973
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top