I'm using Access 2007 with the PDF driver installed. I have 2 reports that I want to merge into 1 PDF file. I'm using the following coding:
The result of this is that a pdf file is created containing the last report
stDocName1.
What I want for each gDealer is the first report follwed by the second report outputed to a pdf file.
The resulting pdf file would have dealer 1 - report1 and report2, then dealer 2 - report1 and report2,etc.
Code:
Set mdbCurrent = CurrentDb
Set Master = mdbCurrent.OpenRecordset(strSQL, dbOpenDynaset, dbSeeChanges)
Do While Not (Master.EOF)
gDealer = Master!Dealer_Num
gProv = Master![ST/PROV]
stDocName = "General_Field_Order"
If gProv = "PQ" Then
stDocName1 = "General_MIR_French"
Else
stDocName1 = "General_MIR_English"
End If
DoCmd.OutputTo acOutputReport, stDocName, "PDFFormat(*.pdf)", "C:\Summer_Maintenance\Test\Test_Dealers1", False, "", 0, acExportQualityPrint
DoCmd.OutputTo acOutputReport, stDocName1, "PDFFormat(*.pdf)", "C:\Summer_Maintenance\Test\Test_Dealers1", False, "", 0, acExportQualityPrint
Master.MoveNext
Loop
mdbCurrent.Close
stDocName1.
What I want for each gDealer is the first report follwed by the second report outputed to a pdf file.
The resulting pdf file would have dealer 1 - report1 and report2, then dealer 2 - report1 and report2,etc.