title: pulling up a report for the current selected record in access 2010
body: <p>I currently have a report called HoldTag that I put together that just displays some basic information about a product. I did it writing the query, saving that, then creating a report from that query.</p>
  
  <p>On another form, I made a button that when clicked, is supposed to open that report and only display the info from the record that was being viewed when you click the button. The way I did that was to place the following in the click even handler in the code behind:</p>
  
  <pre><code>Private Sub btnPrintTag_Click()
  
  Dim strReportname As String
  Dim strCriteria As String
  
  strReportname = "HoldTag"
  strCriteria = "[ID] = &amp; Me.ID"
  
  DoCmd.OpenReport strReportname, acViewPreview, strCriteria
  
  
  End Sub
  </code></pre>
  
  <p>When I click this button, the report launches, but it makes a page for every record on file. How do I make it only do it for the current record? TIA</p>