Close a report after printing

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

Guest

I have an Access report that I'm coverting to PDF by sending it to a PDF
converter through the print option. After the report open, and users choose
to print to the PDF converter, I would like for the report to close
automatically. Is there a way to do that?

Thanks!
 
You may want to get some help from Adobe on this. Once the report has been
"printed" to a PDF, Access is no longer involved. You are now in whatever
version of Adobe you have installed.
 
I'm sorry, I may not have been clear. Currently the users click a command
button which opens a report. From there, once they have previewed it and are
satisfied, they choose print from the file menu and choose the PDF option.
The Access version of the report stays open even after the PDF is created.
It's the Access version that I want to close. Actually, my end goal is to
have the Access report close and then have a form that is minimized get
maximized again.
 
I don't know of any simple way to do that. This may be more than what you
want to go thru, but I think you could create a toolbar that has an option to
Print to a PDF (which would also then close the report). Toolbars typically
run macros, so you would first have to create a macro that would 1) print the
report to the PDF, then 2) close the report. You would specify this toolbar
in the Toolbar property of the report so that it shows up at the top of the
screen when the report is previewed. If you don't know how to create toolbars
and you don't have a book that has the info, access help can help you and I'm
sure there's some info on how to do it on the web - I'm a bit swamped with
work right now to go into the details of it. Hope this helps.
 
I don't know why your form is being immixed....


Just open he report...it will appear on top....

Place a custom pdf button on the form...run the code to create the pdf
(either prompt user for the name, or auto give it one).

Once the code runs, then simply close the form....

I would not bother with a pdf printer...use lebans solution here:

http://www.lebans.com/reporttopdf.htm

Lebans solution lets you use code, and thus you can have a one click button
on your reports menu bar..and users will not even have to go file->print
(which for many is confusing anyway...why does a user "print" to create a
pdf???).
 
I don't know why your form is being immixed....

Just open he report...it will appear on top....

Place a custom pdf button on the form...run the code to create the pdf
(either prompt user for the name, or auto give it one).

Once the code runs, then simply close the form....

I would not bother with a pdf printer...use lebans solution here:

http://www.lebans.com/reporttopdf.htm

Lebans solution lets you use code, and thus you can have a one click button
on your reports menu bar..and users will not even have to go file->print
(which for many is confusing anyway...why does a user "print" to create a
pdf???).

I don't see why you need to automatically close the report if you
already trust the users to preview it, the user should just close it
themselves. I have set up some VBA code in the On Close event for the
report that maximizes the underlying form ( just incase the form "gets
lost") see below for my particular code:

DoCmd.SelectObject acForm, "frmadminform"
DoCmd.Maximize
 
Back
Top