rotschreck
Programmer
Hey there.<br><br>I am working on trying to get some combo boxes to select a selection list in another selction list. So far the code seems to be ok except that it doesn't work. ... so obviously I missed something.<br><br>As far as I can see, it has something to do with the FillArray command on line 39, as after that line, nothing prints to the screen.<br><br>Here's the code and thanks in advance for any help you can offer:<br><br>____________________________________________________________<br><%@ Language=VBScript %><br><% Option Explicit %><br><br><!-- #include file=adovbs.inc --><br><!-- #include file=DynamicSelect.inc --><br><br><%<br>DIM Conn, rsPrimary, rsSecondary, intFirstPub, DB_CONNECTIONSTRING, objRecordset <br><br> ' Put your connection information here.<br> 'Set Conn = Server.CreateObject("ADODB.Connection"<br><br>DB_CONNECTIONSTRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("mndm.mdb" & ";"<br>Conn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("mndm.mdb" & ";"<br><br> SET rsPrimary = Server.CreateObject("ADODB.RecordSet"<br> SET rsSecondary = Server.CreateObject("ADODB.RecordSet"<br> Set objRecordset = Server.CreateObject("ADODB.Recordset"<br>%><br><br><HTML><br><HEAD><br><TITLE>Help<br></TITLE></HEAD><br><br><BODY><br><br><%<br>objRecordset.Open "withdrawalsReopenings", DB_CONNECTIONSTRING, adOpenStatic, adLockPessimistic, adCmdTable<br>rsPrimary.Open "SELECT primid, primpurp FROM purpose1 ORDER BY primpurp", Conn<br><br>IF NOT (rsPrimary.BOF AND rsPrimary.EOF) THEN<br> intFirstPub = rsPrimary("primid"<br>ELSE<br> intFirstPub = 0<br>END IF<br>rsSecondary.Open "SELECT primid, secid, secpurp FROM purpose2 ORDER BY primid, secpurp", Conn <br><br>FillArray "arrpurpose2", rsSecondary, "primid", "secid", "secpurp"<br>%><br><br><CENTER><br><H2>Dynamic Select List</H2><br><FORM><br><TABLE WIDTH=100%><br><TR><br> <TD>Primary List:<br><br><%SelectBox rsPrimary, "lstpurpose1", "primid", "primpurp", "lstpurpose2", "arrpurpose2" %><br> </TD><br> <TD>Secondary List:<br><br><%<br> rsSecondary.Filter = "primid = '" & intFirstPub & "'"<br> SelectBox rsSecondary, "lstpurpose2", "secid", "secpurp", "", " " <br> rsSecondary.Filter = adFilterNone<br>%><br> </TD><br></TR><br></TABLE><br></FORM><br></CENTER><br></BODY><br></HTML> <p> <br><a href=mailto: > </a><br><a href= Eclectic Page</a><br>