This is from another question where I participated and the requirement was similar to yours. In this the first drop down (Company) is populated from the company table. When the company is selected the second drop down (Company Address) is populated from another table. You have similar but 4 level of exact requirement. Add 2 more recordsets and you will have something that you need. Hope this will get you started.
<%
sCompanyId = Request("CompanyId")
sSQL = "select * from Company"
oRs.Open sSQL, oConn
%>
<form name="MyForm" method="post">
<select name="CompanyId" onchange="this.form.submit
<%
while Not oRs.EOF
if (sCompanyId = oRs("CompanyId")) then
sSelected = "selected"
else
sSelected = ""
end if
%>
<option value="<%=oRs("CompanyId")
<%
oRs.MoveNext
wend
%>
</select>
<%
sCompanyAddress = Request("CompanyAddress")
if (sCompanyId = "") then
sCompanyId = -1
end if
sSQL = "select * from CompanyAddress where CompanyId = " & sCompanyId
oRs.Close
oRs.Open sSQL, oConn
%>
<select name="CompanyAddress" onchange="this.form.submit
<%
while Not oRs.EOF
if (sCompanyAddress = oRs("CompanyAddress")) then
sSelected = "selected"
else
sSelected = ""
end if
%>
<option value="<%=oRs("CompanyAddr
<%
oRs.MoveNext
wend
%>
</select>
</form>
Main Topics
Browse All Topics





by: fritz_the_blankPosted on 2003-08-29 at 15:34:22ID: 9252013
This should help:
com/webtec h/061399-1 .shtml
http://www.4guysfromrolla.
Fritz the Blank