Print Report from Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have been getting weird behavior when printing a report from within a report. The report will either print and all works beautifully or it will blue screen any computer it runs on
I set the code up within the from to open the report in preview mode

DoCmd.OpenReport RepName, acViewPrevie

The Activate event on the report runs this code

DoCmd.PrintOut , 1, 1, acDraft, Form_frmLockoutSelection.TagsToPr
DoCmd.Close acReport, Me.Name, acSaveN

I guess what I am asking is if their is another way to print the report without user intervention (this would mean the not having to click File->Print)

Thanks in advance.
 
yes. instead of acViewPreview, leave that blank and it will default to
printing the report. remove the rest of the code. Just be sure to set up the
print options and save them with the report.
Darren said:
I have been getting weird behavior when printing a report from within a
report. The report will either print and all works beautifully or it will
blue screen any computer it runs on.
I set the code up within the from to open the report in preview mode:

DoCmd.OpenReport RepName, acViewPreview

The Activate event on the report runs this code:

DoCmd.PrintOut , 1, 1, acDraft, Form_frmLockoutSelection.TagsToPrn
DoCmd.Close acReport, Me.Name, acSaveNo

I guess what I am asking is if their is another way to print the report
without user intervention (this would mean the not having to click
File->Print).
 
Back
Top