title: MS Access VBA temporarily highlight field
body: <p>When a user switches between records on a sub form, I want another field to highlight temporarily to catch the eye to alert the user that it has changed.</p>
  
  <p>I would think that this would work:</p>
  
  <pre><code>Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
  </code></pre>
  
  <hr>
  
  <pre><code>Private Sub Form_Current()
      Form_frm_Codes.txtCodeToAdd = Me.Code.Value
      Form_frm_Codes.txtCodeToAdd.BackColor = RGB(0, 0, 255)
      Sleep (500)
      Form_frm_Codes.txtCodeToAdd.BackColor = RGB(255, 255, 255)
  End Sub
  </code></pre>
  
  <p>The sleep function tends to pause the program for half a second, but I don't see the blue change imediately before.</p>
  
  <p>Any ideas or even a better way to achieve this?</p>