title: Access TextBox does not update during VBA loop, only after
body: <p>In access using VBA.</p>
  
  <p>I have a quite simple situtation, and I see some different solutions online, but non of them works for me.</p>
  
  <p>I have a form with a textbox that needs to be updated in a for loop.
  I have reduced the script to the following:</p>
  
  <pre><code>For counter = 1 To 100
  
  Application.Echo False
  DoCmd.OpenQuery "Query1"
  DoCmd.Close
  Application.Echo True
  
  strStatus = "Loop is " &amp; counter &amp; " % done"
  Call dsp_progress_AfterUpdate
  Me.Refresh
  DoEvents
  
  Next
  </code></pre>
  
  <p>And the sub thats called:</p>
  
  <pre><code>Private Sub dsp_progress_AfterUpdate()
  Me.Dirty = False
  End Sub
  </code></pre>
  
  <p>The textbox controlsource is the strStatus (Through a function).</p>
  
  <p>Every loop takes about 4 seconds (The query), so it is not because its over in 2 ms.</p>
  
  <p>It only updates when the for loop is finished.</p>
  
  <p>The strange thing is, if i use the curser and manually click on the text box while the loop is running, it actually works.........</p>
  
  <p>So the question is, how do i make it update "live" without having to click on the textbox with the mouse/curser? That is not convenient for a status display.</p>
  
  <p>Help, please... :)</p>
  
  <p>Best Regards, Emil.</p>