Quote:
quote:Originally posted by JAdkins
Ok so after reading what I posted I see what i did wrong... Thanks again for your help
|
Try this
<HTML>
<HEAD>
<script language="VBScript">
Sub PopulateSecondDropDown
Dim TheForm
Set TheForm=Document.forms("YourFormName")
TheForm.SecondDropDown.value=""
TheForm.action="YourPageName.asp"
TheForm.submit
End Sub
</script>
<Tr>
<TD>Show Location</TD>
<TD>
<%if not objRS.Eof then%>
<SELECT NAME="ShowProp"
onchange="PopulateSecondDropDown();">
<%While not objRS.EOF%>
<option value="<%=objRS("uniqueID")%>"><%=objRS("PropertyN ame")%>
</option>
<%
objRS.MoveNext
Wend
%>
</SELECT>
<%
else
response.write "no records found"
end if
%>
</TD>
<%
dim RS
dim count
Dim objConn
set ObjConn = server.CreateObject("adodb.Connection")
ObjConn.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("dB.mdb")
SelectedProp = Request.Form("ShowProp")
set RS = server.createObject("adodb.recordset")
SQL = "SELECT * from TABLENAME where recID = '" & SelectedProp & "'"
RS.open SQL,ObjConn
if not RS.EOF then
%>
<TD>SHOW OTHER RECORDS [DROP DOWN]</TD>
<TD>
<SELECT NAME="ShowOtherRecords">
<%While not RS.EOF%>
<option value="<%=RS("uniqueID")%>"><%=objRS("OtherColumnN ame")%>
</option>
</SELECT>
<%
else
response.write "No value obtained from first drop down."
end if
%>
</TD>
</TR>
T.B.
misskaos99@yahoo.com