UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Print multiple reports.    
 
   
svnthtysvn
post Dec 9 2004, 03:53 PM
Post #1

UtterAccess Member
Posts: 39
From: Maine, USA



Hi, this is very urgent...how do I use a print button to open a report in print view and print 2 reports, not just one? THanks!!!!
Go to the top of the page
 
+
Larry Larsen
post Dec 9 2004, 03:58 PM
Post #2

UA Editor + Utterly Certified
Posts: 22,722
From: Melton Mowbray,Leicestershire (U.K)



Hi
Taken from an article:

Printing multiple copies of the same Report

If you want to print out multiple copies of a report, then you can use the PrintOut Method, provided that the report is the active object, i.e. you need to firstly open the report in Preview mode. Another way of doing this would be to repeatedly use the OpenReport Method:

DoCmd.OpenReport "rptName"
DoCmd.OpenReport "rptName"
DoCmd.OpenReport "rptName"

The way that I have done this before is to use a short procedure that accepts the report name and the number of copies to be printed, and then uses a For...Next loop to print the required number of copies:

Sub sPrintMultipleReportCopies(strReportName As String, bytNumberCopies As Byte)
Dim bytCounter As Byte
For bytCounter = 1 To bytNumberCopies
DoCmd.OpenReport strReportName
Next bytCounter
End Sub

I can then call this procedure:

Call sPrintMultipleCopies("rptName",3)

Which will give me 3 copies of the report called 'rptName'.

HTH's
(IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 22nd May 2013 - 04:18 PM