title: VBA Deleting records by iterating through ADODB Result Set
body: <p>I am trying to loop through an ADODB resultset and delete the record if a condition is true. However, when I do this only the first field of the record is deleted the rest of the record remains.</p>
  
  <p>Any Ideas?
  I have the following code:</p>
  
  <pre><code>Set ytdRS = New ADODB.Recordset
  ytdRS.Source = SQL_YTD
  ytdRS.CursorType = adOpenStatic
  ytdRS.LockType = adLockBatchOptimistic
  
  rst.MoveFirst
  Do Until rst.EOF
    if (value = 1) then  
      rst.Delete
      rst.MoveNext
    end if    
  Loop
  </code></pre>