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