[AccessD] Printing reports

Steve Turner sturner at mseco.com
Wed Mar 9 14:39:29 CST 2011


Hey guys,

Hope one of you can help us. We generate a list of numbers that are job
numbers and print a report for each number. It takes about 2 minutes to
generate a report. It then gets written to a directory as a pdf based on
the job number. Well this takes quite a while for 50 reports. We can
generate a report that has all 50 sheets in it about the same amount of
time 2 minutes but we don't know how to print each sheet separately from
that report to a file. In Access when you select print you can tell it
what page to print. Is there some code that will select the sheet to
print so you can set up a loop to go thru all the sheets one at a time?
We are using Access 2010 to do this. Here is the code we use to print
one sheet to the directory.

 

 

'       CREATE THE REPORT IN JOB FOLDER

'       PDF Format

'       strFileReport = "F:\HMS\" & strJobNo & "_" & strReportDate &
".pdf"

'       This should write to job file

        strFileReport = "J:\" & strJobDirectory & "\" & strJobFamily &
"\" & strShortJobNo _

        & "\0.0 M-S Internal Info\0.9 Labor Recaps\" & strJobNo & "_" &
strReportDate & ".pdf"

      

       DoCmd.OutputTo acOutputReport, strDocName, acFormatPDF,
strFileReport, 0

        DoEvents

 

        RS.MoveNext

 

 

Steve A. Turner
Controller
Mid-South Engineering Co. Inc
P.O. Box 1399
Hot Springs, AR 71902
E-Mail: sturner at mseco.com and saturner at mseco.com
Phone: (501)321-2276
Fax:     (501)321-4750
Cell:     (501)282-7751

 




More information about the AccessD mailing list