title: Need to (force) the refresh of the MS Access database immediately after the delete statement
body: <p>I use an MS Access database. In the code below, I loop through a recordset and delete each record. Directly after the delete statement, the function RefreshPlanning perform a select query based on the same table. The problem is that the record is not instantly deleted in the table and so the RefreshPlanning is querying some record who normally has been deleted! So I need to refresh the db (empty the cache?) instantly after the delete statement. How can I proceed?</p>
  
  <pre><code>    Dim rstTraitements as ADODB.Recordset
      Set rstTraitements = SelectQuery("SELECT * FROM tblTraitements WHERE ID like 123")
  
      ' Loop through all selected elements.
      While Not rstTraitements.EOF
         ' Delete current record in the table.
         rstTraitements.Delete
         MsgBox "a database refresh is needed here before the next statement"
         RefreshPlanning DatePlanning, CodeEquipement           
         rstTraitements.MoveNext
      Wend
  </code></pre>
  
  <p>Remark 1: SelectQuery is a function who return a recordset</p>
  
  <p>Remark 2: RefreshPlanning is a function who perform a select query based on the same table (tblTraitements).</p>
  
  <p>Thank you for your help.</p>