Print Multiple Reports Problem

DentTec

Registered User.
Local time
Today, 15:45
Joined
Apr 3, 2011
Messages
25
Hello all

I want to refine my code. I'm printing multiple reports while looping through my list. I have to open and close report for each selected item in the listbox. Is there a way to by pass this ? Thanks

Private Sub cmdPrintAll_Click()
'for each client in the client's list, print the statement
For i = 0 To 1
Me.List0.selected(i) = True
clientSelected = Me.List0.Column(0, i)
DoCmd.OpenReport "Monthly Statement"
DoCmd.Close acReport, "Monthly Statement"
Next i
End Sub
 
Create GROUP BY clause in your report and set it to start a new page for each customer.
 
Ok, I figured out the answer to my question. Now comes some others.
Mots of each statement takes only 1 page, some take up to 2 pages.

1. The "page of Pages" at the PageFooter does not show page 1 of 1 for each customer but 1 of 59 and 2 of 59 and so on. How can I get it to show 1 of 1 or 1 or 2 only?

2. Some clients have a lot of invoices which spread out to two pages. The Sum of Charge at the ClientFooter only sum up those invoices in each page. How do I sum up all the invoices in those two pages for these particular sistuations ?

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom