Hello,
I am trying to open a report from a form and print the first page only without any dialog boxes popping up, etc.
Code:
DoCmd.OpenReport "R_PROPOSAL", acViewPreview, , "PROPOSAL_ID='" & Me.PROPOSAL_ID & "'", acHidden
DoCmd.PrintOut acPages, 1, 1, acHigh
DoCmd.Close acReport, "R_PROPOSAL", acSaveNo
If I use DoCmd.OpenReport (which prints automatically) it prints all pages.
If I use the above code which opens the report in Print Preview (and hidden) The PrintOut ends up printing my current active object (the form and not the report). If I remove acHidden then it prints what I want it to. I just want it to happen without showing the preview.