Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create PDF of a report through a command button

Status
Not open for further replies.

scoobypaw

Technical User
Jun 8, 2005
20
US
Hello

Is there a way to create a PDF of a report through a command button ? If so, does anyone know how I would write the code ?

Thanks
 
I wouldnt mind an answer to this either.

Here is what I think is involved:

1) create a funtion (or sub) that will have Application.Printer = Application.Printers(PDF995)
docmd.printout acprintall

if you have a different pdf printer name, then replace PDF995 with that.

2) create a macro, and have it runcode - that code

if you created 1 as a sub you will have to create a function to call that sub.

3) in the report design, check the box for the toolbar - printpreview - then add a custom button, name it soemthing good, and assign that macro to it.

Good luck and let me know if this works for you.

misscrf

It is never too late to become what you could have been ~ George Eliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top