title: ASP Table and EOF - Get error '80020009'
body: <p>Consider a recordset containing four rows, as below</p>
  
  <pre><code>Team  NumDocs
  OPS10 2
  OPS4  1
  OPS5  2
  OPS7  3
  </code></pre>
  
  <p>Consider also the following row in a table to display these. </p>
  
  <pre><code>&lt;td&gt;
  &lt;% If Trim(RS("Team")) = "OPS1" And not RS.EOF Then
  Response.Write(RS("NumDocs")) 
  RS.MoveNext 
  End If%&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;% If Trim(RS("Team")) = "OPS10" And not RS.EOF Then
  Response.Write(RS("NumDocs")) 
  RS.MoveNext
  End If%&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;% If Trim(RS("Team")) = "OPS2" And not RS.EOF Then
  Response.Write(RS("NumDocs")) 
  RS.MoveNext 
  End If%&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;% If Trim(RS("Team")) = "OPS3" And not RS.EOF Then
  Response.Write(RS("NumDocs")) 
  RS.MoveNext 
  End If%&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;% If Trim(RS("Team")) = "OPS4" And not RS.EOF Then
  Response.Write(RS("NumDocs")) 
  RS.MoveNext 
  End If%&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;% If Trim(RS("Team")) = "OPS5" And not RS.EOF Then
  Response.Write(RS("NumDocs")) 
  RS.MoveNext 
  End If%&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;% If Trim(RS("Team")) = "OPS6" And not RS.EOF Then
  Response.Write(RS("NumDocs")) 
  RS.MoveNext 
  End If%&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;% If Trim(RS("Team")) = "OPS7" And not RS.EOF Then
  Response.Write(RS("NumDocs")) 
  RS.MoveNext 
  End If%&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;% If Trim(RS("Team")) = "OPS8" And Not RS.EOF Then
  Response.Write(RS("NumDocs")) 
  RS.MoveNext 
  End If%&gt;
  &lt;/td&gt;
  &lt;td&gt;
  &lt;% If Trim(RS("Team")) = "OPS9" And Not RS.EOF Then
  Response.Write(RS("NumDocs")) 
  RS.MoveNext 
  End If%&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>The header row contains 10 hard coded headings, OPS1, OPS10, OPS2, etc.</p>
  
  <p>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.</p>
  
  <p>Can anyone assist?</p>