ASP Table and EOF - Get error '80020009'

betgwwyeyyzh

New Member
Consider a recordset containing four rows, as below\[code\]Team NumDocsOPS10 2OPS4 1OPS5 2OPS7 3\[/code\]Consider also the following row in a table to display these. \[code\]<td><% If Trim(RS("Team")) = "OPS1" And not RS.EOF ThenResponse.Write(RS("NumDocs")) RS.MoveNext End If%></td><td><% If Trim(RS("Team")) = "OPS10" And not RS.EOF ThenResponse.Write(RS("NumDocs")) RS.MoveNextEnd If%></td><td><% If Trim(RS("Team")) = "OPS2" And not RS.EOF ThenResponse.Write(RS("NumDocs")) RS.MoveNext End If%></td><td><% If Trim(RS("Team")) = "OPS3" And not RS.EOF ThenResponse.Write(RS("NumDocs")) RS.MoveNext End If%></td><td><% If Trim(RS("Team")) = "OPS4" And not RS.EOF ThenResponse.Write(RS("NumDocs")) RS.MoveNext End If%></td><td><% If Trim(RS("Team")) = "OPS5" And not RS.EOF ThenResponse.Write(RS("NumDocs")) RS.MoveNext End If%></td><td><% If Trim(RS("Team")) = "OPS6" And not RS.EOF ThenResponse.Write(RS("NumDocs")) RS.MoveNext End If%></td><td><% If Trim(RS("Team")) = "OPS7" And not RS.EOF ThenResponse.Write(RS("NumDocs")) RS.MoveNext End If%></td><td><% If Trim(RS("Team")) = "OPS8" And Not RS.EOF ThenResponse.Write(RS("NumDocs")) RS.MoveNext End If%></td><td><% If Trim(RS("Team")) = "OPS9" And Not RS.EOF ThenResponse.Write(RS("NumDocs")) RS.MoveNext End If%></td>\[/code\]The header row contains 10 hard coded headings, OPS1, OPS10, OPS2, etc.The section above which populates OPS7's colum is fine, and the value of "2" is written to the cell. Then I get an error on the next column for OPS8 - obviously there's no returned value for this as it only goes up to OPS7. This is why I put a Not EOF in the IF statement, but I am still getting the error.Can anyone assist?
 
Back
Top