I have two combo boxes and I want the user to slect a Facility from one and then populate the second one with Chemicals found at that facility.
here is what I have so far
where do I put the SQL string and open the recordset for the next combo box
DougP
< I Built one
here is what I have so far
Code:
<%
rtnCompany ="Foster Wheeler"
Set fp_conn = Server.CreateObject("ADODB.Connection")
Set fp_rs_Facility = Server.CreateObject("ADODB.Recordset")
Set fp_rs_Analyte = Server.CreateObject("ADODB.Recordset")
'Set fp_rs_Analyte = Server.CreateObject("ADODB.Recordset")
fp_conn.Open Application("IHDatabase_ConnectionString")
SQLStringFacility ="SELECT Company, Facility FROM IndustrialHygiene GROUP BY Company, Facility HAVING (((Company) Like '" & rtnCompany & "%'));"
'response.write SQLStringFacility
fp_rs_Facility.Open SQLStringFacility, fp_conn, 1, 3, 1
fp_rs_Facility.movefirst
%>
<p class=MsoNormal align=center style='text-align:center'>
<select size="1" name="ddChooseFacility">
<option selected value="Choose Facility">Choose Facility</option>
<%do while not fp_rs_Facility.eof%>
<option><%=fp_rs_Facility("Facility")%></option>
<%fp_rs_Facility.movenext%> <select size="1" name="D1"></select><%loop%></select></p>
<p class=MsoNormal align=center style='text-align:center'>
</p>
<p class=MsoNormal align=center style='text-align:center'>
<select size="1" name="ddAnalyte">
<option value="Choose Analyte" selected>Choose Analyte</option>
<option value="add Chemicals here">add Chemicals here</option>
</select></p>
<%set fp_rs =nothing%>
<%set fp_conn=nothing%>
where do I put the SQL string and open the recordset for the next combo box
DougP
< I Built one