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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need VBA code for merging 3 MS Access reports to 1 PDF

Status
Not open for further replies.

jasonbro

MIS
Apr 18, 2012
14
US
This is my current VBA code for printing my report. I am using MS Access 2010 and my goal is to print 3 separate reports into 1 PDF report in order to save to a file for a different client each time.

The first report name is "Close Package"; the "ee_Filter" is used so I can print the curent information that I am currently looking at in a form. The other report names are "ClosePackage 2" and "ClosePackag3".

Please help.

Private Sub Command159_Click()
On Error GoTo Err_Command159_Click

Dim stDocName As String

stDocName = "Close Package"
DoCmd.OutputTo acReport, stDocName, "ee_Filter"

Exit_Command159_Click:
Exit Sub

Err_Command159_Click:
MsgBox Err.Description
Resume Exit_Command159_Click

End Sub

When I run this I get an error "The format in which you are attempting to output the current object is not available"
 
Have you looked at the OutputTo documentation? You don't seem to have much of a clue on how it is used.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top