title: Running VBA code in MS Access report when it is openned without preview for printing
body: <p>The below code prints a MS Access Report without opening it for preview.
  However, I would like to run some code to modify the report when a user selects to print it.</p>
  
  <pre><code>DoCmd.OpenReport RptName, , , "[ItemNumber]= " &amp; Me.ItemNum
  </code></pre>
  
  <p>I have tried the "On Activate", "On Open", and "On Page" events but none of them run the code that I place in there.</p>
  
  <p>Each ItemNumber has an image associated with it. Whenever they hit the print button the above code runs sending the itemNumber they would like printed and at that moment I would like to insert the appropriate unbounded image to print on the report.</p>