Link to home
Start Free TrialLog in
Avatar of groovymonkey
groovymonkeyFlag for Canada

asked on

How do you print directly to pdf without previewing report in MS Access first

Hello,
I have a somewhat cumbersome main report that has 10 sub queries on it...I am using a form to Query date values that then creates a table that all of my queries query from...when I generate the report it takes about 15 minutes and it pops up in preview...I then want to save it to pdf and it goes through the whole 15 minute process of querying calculating etc...is there a way to code the generate report key i have on my form to go straight to a pdf format when done?  I have the full version of acrobat I just want to skip the printer->adobe printer steps that then causes the whole report to be regenerated...
groovymonkey
ASKER CERTIFIED SOLUTION
Avatar of omgang
omgang
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Get either cutepdf -- http://www.cutepdf.com/ or pdfcreator -- http://www.mrbass.org/freeware/pdfcreator/ install it as a printer on your PC. Then select it as your printer in Access and right click the report and hit selct print.  It will go straight to print
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of groovymonkey

ASKER

How do I code it to open in 'PRINT' mode...I am using the following code to open in preview mode...

Private Sub Generate_Main_Report_Click()
On Error GoTo Err_Generate_Main_Report_Click

    Dim stDocName As String

    stDocName = "QBF_MainReport"
    DoCmd.OpenReport stDocName, acPreview

Exit_Generate_Main_Report_Click:
    Exit Sub

Err_Generate_Main_Report_Click:
    MsgBox Err.Description
    Resume Exit_Generate_Main_Report_Click
   
End Sub

thanks groovymonkey
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
DoCmd.OpenReport stDocName  will do it ..... the default is normal view (print mode)

Scott C