Article ID: 132241
Article Last Modified on 9/7/2001
'****************************************************************
'Declarations section of the module
'****************************************************************
Option Compare Database
Option Explicit
'**********************************************************************
'NumPages is the number of pages in the largest report. If one report
'has fewer pages, the DoCmd Print statement for the smaller report runs
'correctly and no additional pages are printed.
'**********************************************************************
Function CollateReports(NumPages, Rpt1 as String, Rpt2 as String)
Dim MyPageNum As Integer
' Set the page number loop and alternate printing the report pages.
For MyPageNum = 1 to NumPages
' NumPages is the number of pages to print.
DoCmd SelectObject A_REPORT, Rpt1, True
DoCmd Print A_PAGES, MyPageNum, MyPageNum
DoCmd SelectObject A_REPORT, Rpt2, True
DoCmd Print A_PAGES, MyPageNum, MyPageNum
Next MyPageNum
End Function
Keywords: kbhowto kbprint KB132241