rotschreck
Programmer
HI again. I should probably change my name to Mr Impossible. *sigh* I've been inquiring about combo box that will change the values of another combo box.<br><br>So far, I've gathered examples and have tried to make them fit. As far as I can tell, they should, though, they don't.<br><br>I need the asp select boxes so that I can send the entries to the database all at once. I've tried the vb code by itself and it works. All I need is to be able to mix the 2 and I'm set.<br><br>I figure that if I can get the SelectBox function to simply post the information and allow for the auto selection, I've got it made.<br><br>____________________________________________________________<br>Page code:<br><br> <td valign="top">Purpose:</td><br> <td valign="top"><br><select name="purpose1"><br> <option value="<%SelectBox rsPrimary, "lstpurpose1", "primid", "primpurp", "lstpurpose2", "arrpurpose2" %></option><br> </select><br> </td><br> <td valign="top" rowspan="2">Request Received:<br> </td><br> <td valign="top"><input type="text" name="daterec" value="<%=Request.Form("daterec"%>"></td><br> </tr><br> <tr><br> <td valign="top"></td><br> <td valign="top"><br><%<br>Set objpurpose2 = Server.CreateObject("ADODB.Recordset"<br>objpurpose2.Open "purpose2", Conn, 3, 3<br>%><br><select name="purpose2"><br> <option value="<%<br> rsSecondary.Filter = "primid = '" & intFirstPub & "'"<br> SelectBox rsSecondary, "lstpurpose2", "secid", "secpurp", "", " " <br> rsSecondary.Filter = adFilterNone<br>%></option><br> </select><br><% <br> ' Closing the connection<br> rsPrimary.Close<br> Set rsPrimary = Nothing<br>%><br><br>____________________________________________________________<br>VB Code:<br><br>SUB SelectBox(rsOptions, strName, strValue, strDisplay, strSecondary, strArray)<br> DIM strSelect<br> strSelect = vbCRLF & "<SELECT name=" & chr(34) & strName & chr(34) & _<br> " id=" & chr(34) & strName & chr(34) & " size=1 "<br> <br> IF strSecondary <> "" and strArray <> "" THEN<br> strSelect = strSelect & " OnChange=" & chr(34) & "ChangeOptions('" & _<br> strName & "', '" & strSecondary & "', '" & strArray & "')" & chr(34) & ">" & vbCRLF<br> ELSE<br> strSelect = strSelect & ">" & vbCRLF<br> END IF<br> Response.Write strSelect<br> <br> Do Until rsOptions.EOF<br> Response.Write "<OPTION value=" & chr(34) & rsOptions.Fields(strValue) & chr(34) & ">"<br> Response.Write Trim(rsOptions.Fields(strDisplay)) & "</OPTION>" & vbCRLF<br> rsOptions.MoveNext<br> LOOP<br> rsOptions.MoveFirst<br> Response.Write "</SELECT>"<br>END SUB<br><br>TIA <p> <br><a href=mailto: > </a><br><a href= Eclectic Page</a><br>