I am trying to duplicate some one else's report with a web page. The report looks like an outline.
The way I have accomplished this it with a three deep nested Do While Loop and three recordsets here is the code;
Code:
If Recordset Then %>
<table>
<tr><th>Part Used</th><th>Symptom Code</th><th>Symptom Description</th><th>Part Notes</th><th>Total</th></tr>
<% Do While Not rs1.EOF %>
<tr><td><%=rs1("replacementPartNumber") %> </td><td><%=rs1("description") %> </td><td> </td><td> </td><td><%=rs1("total") %> </td></tr>
<%
Do While rs1("replacementPartNumber") = rs2("replacementPartNumber")%>
<tr><td> </td><td><%=rs2("symptomCode") %> </td><td><%= rs2("sympDesc") %> </td><td> </td><td><%=rs2("test") %> </td></tr>
<%
Do While rs2("symptomCode") = rs("symptomCode")
%>
<tr><td> </td><td> </td><td> </td><td><%=rs("test2") %> </td><td><%=rs("test") %> </td></tr>
<%rs.MoveNext
Loop
rs2.MoveNext
Loop
rs1.MoveNext
Loop
rs1.MoveFirst %>
</table>
<%
rs.Close
rs1.Close
rs2.Close
Set rs = Nothing
Set rs1 = Nothing
Set rs2 = Nothing
End If
I tried to take out as much of the HTML style coding to make it easier to read.
My problem is that it runs and gives me the expected results except right above the table it displays an error message;
error '80020009'
/testdev/davie/davieworking/citizenPartUsageData.asp, line 71
line 71 is the inner most Do While statement.
If I remove the inner most Do While Loop the same error occurs at the "new" inner most loop.
Any help would be appreciated
Thanks