title: VBA code is printing report instead of opening it
body: <p>I have a button on a form that should open a report but it sending the report to the default printer instead. How do stop it from printing? I'm using access 2010</p>
  
  <pre><code>Private Sub Generate_Click()
      If Me.Staff = "&lt;&lt; All &gt;&gt;" Then
          DoCmd.OpenReport "rptAll", acViewNormal, , , acHidden
      Else
          DoCmd.OpenReport "rptStaff", acViewNormal, , , acHidden
      End If
  End Sub
  </code></pre>