Have coding print a report and close it also

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

Guest

I currently have a form (client accounts) within it a command button that
opens form (print options) the "print options" form opens as a popup modal
form and has a list of different reports to print. I have been able to code
the following:

"print options" form has command button (charges report) and does the
following:
opens the report
prints the report
closes the form "print options"
(report stays open)

Question: what is the code I need to also close the report after it prints
along with the "print options" form.

Thanks,

Jose Montes Jr.

PS - You guys/gals have been great...I enjoy learning from your vast
experiences...I absorb your knowledge like a sponge...thanks.
 
After the code that closes your form try this.

DoCmd.Close acReport, "YourReportName",

Be sure and use a coma after acReport. When you type the last coma you have
3 options Save Yes, Save No, Save Prompt.

Hope this helps,

Paul
 
Back
Top