Michael Mattys
michael at mattysconsulting.com
Wed Mar 9 15:08:53 CST 2011
Hi Steve, Isn't it simply a matter of filtering a query that the report is based on to the individual JobID and then output each one? Michael R Mattys Business Process Developers www.mattysconsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Turner Sent: Wednesday, March 09, 2011 3:39 PM To: accessd at databaseadvisors.com Subject: [AccessD] Printing reports 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com