Print several reports with single command

drp

Registered User.
Local time
Today, 14:45
Joined
Dec 4, 2010
Messages
16
I create database, In that Under the patient Name There are several different reports Like 1)CBC 2)Blood sugar 3) Lipid Profile Test etc
I want these different reports print by single command.
Anybody pls help
me
 
Here's the sequence:

Open the report
Call the DoCmd.PrintOut method
Close the report

Do this for as many times as you need to print.
 
Code:
Private Sub PrintMonthlies_Click()

  DoCmd.OpenReport "CBC", acNormal
  DoEvents  
  DoCmd.OpenReport "Blood Sugars", acNormal
  DoEvents
  DoCmd.OpenReport "Lipid Profile", acNormal
  DoEvents

End Sub

Access is said to be asynchronous, which means that it executes any series of commands 1-2-3, which is to say the second command fires without waiting for the first command to complete running and the third command runs without waiting for the first or the second command to finish executing.

When doing some tasks, such as running a series of reports, this can cause Windows to become swamped, causing problems. The easy way to over come this is to include a DoEvents command between each command. This essentially turns control over to Windows and waits until it finishes running the first task before starting the second task.


Linq ;0)>
 
And don't post the same question more than once on the forums. I've deleted the other two posts of this exact same question.
 
I create database, In that Under the patient Name There are several different reports Like 1)CBC 2)Blood sugar 3) Lipid Profile Test etc
I want these different reports print by single command.
Anybody pls help
me

Thank you sir, I have another problem. My form have two list box in one there are several available report say 100 , from that list i select say 4 reports in second listbox i want these four reports( name of reports are not specific they may vary patient to patient) print with a sigle command button. Pls help!
 
Loop through the listbox using ItemsSelected and for each ItemData follow the steps given in post #2 and the code given by missinglinq.
 

Users who are viewing this thread

Back
Top Bottom