title: In an Access form, how to return to previous record after requery
body: <p>This should be an easy one.  This form is filtered by [Dismissed] = "N".  When the user clicks the "Dismiss" button, the [Dismissed] field changes to "Y".  After the requery, the form  should then return to the same row where the user was previously at.</p>
  
  <pre><code>Private Sub DismissButton_Click()
     Me!Dismissed = "Y"
     MsgBox "Dismissed!", vbOKOnly
     Dim GoBackToThisRecord As Integer
     GobacktothisRecord = Me.CurrentRecord
     Me.Requery
     Set Me.CurrentRecord=GoBackToThisRecord
  End Sub
  </code></pre>
  
  <p>However, even though the built-in help files say that CurrentRecord is a read/write property, I get an "Invalid use of property" error message on this last line. </p>
  
  <p>After setting the [Dismiss]="Y", and requerying the form, how do I get the user back to his/her previous location in the form?</p>