Printing multiple report pages

nice_beaver

Registered User.
Local time
Today, 21:55
Joined
Apr 15, 2002
Messages
15
I have a report which is made up from all projects in a database. In total the number of pages runs to approx 85, but, (and here is my dilemma) I need to be able to offer the facility to print any one of the pages from the report (where each page represents an individual project).

I have provided a list box of all the projects where it is possible to select one or more, but so far I have not been able to print (or preview) each of these individually. I really do not want to go down the route of individual reports for each project as it is intended to add projects to the dbase where I cannot be able to access the dbase.

Trust this makes sense to someone, coz its driving me mad!

Thanks for any help.....
 
It's not as troublesome as you might think. On your switchboard or a popup form or somewhere, have a combo box with all of your Project Names/IDs on it. You don't have to bind it to any record, just make it so they can select one. Then the print button there will have:
Code:
DoCmd.OpenReport "ReportName",acViewNormal,,"[ProjectName] = '" & Forms![FormWithCombo].[comboName] & "'"
Note the single quotes, assuming your project name is text. If you're selecting by ID you can remove the single quotes. ("[ProjectName] = " & Forms![FormWithCombo].[comboName]).

If your button is on the project's form page this process is even simpler, just refer to the PK for the record.

Post back if this is confusing.

David R
 
David,

Thankyou so much. Have to ay, I cpoied your code and it works a treat. To be honest, I've been having late nights and stress trying to resolve this and then it all seems so easy when the solution is given.

Once more, many thanks for getting me out of this problem.
 
No problem. I've often stared at the same problem til my eyes cross only to have someone else ask "well did you try...?"

No, if I'd tried that, do you think I'd still be staring at it?

Glad I could help.
biggrin.gif


David R, with a whole set of other problems
 
Yup, I know exactly what you mean!

This was the last part of a project I had from a company here in the UK; they are currently testing what I've submitted to them, ie trying to crash it, and will be reporting back to me on Thursday with amendments etc, so I can feel much relief knowing that when I return the project with those changes incorporated that this problem has been resolved too.

Once more, many thanks for your help.

Best wishes from a sunny (but chilly) evening in West Wales, UK!!
 

Users who are viewing this thread

Back
Top Bottom