title: Me. in generic requery function fails
body: <p>In an MS Access form that has several buttons (used to add/edit/delete data) with VBA code behind them the code at the end of each button's Subroutine refreshes the screen so the user sees the last record they were on prior to clicking the button.  Here is a sample of requery code for one of the buttons:</p>
  
  <pre class="lang-vba prettyprint-override"><code>Dim rst As Recordset, RecordToView As String
  Set rst = Me.RecordsetClone
  RecordToView = CStr(ProducerID)
  Me.Requery
  rst.FindFirst "ProducerID = " &amp; RecordToView
  Me.Bookmark = rst.Bookmark
  rst.Close
  </code></pre>
  
  <p>This code, or a similar version, is currently repeated for all buttons on the form.  Here is an attempt to create a generic function so this redundant code can be eliminated:</p>
  
  <pre class="lang-vba prettyprint-override"><code>Public Function RefreshScreen(Field As String, ByVal RecordToView As String)
      Dim rst As Recordset
      Set rst = Me.RecordsetClone
      Me.Requery
      rst.FindFirst Field &amp; " = " &amp; RecordToView
      Me.Bookmark = rst.Bookmark
      rst.Close
  End Function
  </code></pre>
  
  <p>And called like so:</p>
  
  <pre class="lang-vba prettyprint-override"><code>Call RefreshScreen("ProducerID", ProducerID)
  </code></pre>
  
  <p>However, it gives a "Compile error: Invalid use of Me keyword" message when it hits Me.RecordsetClone in the generic function.  What modifications need to be made to the generic function to get it to work?</p>