printing 2 reports at once

kato68

Registered User.
Local time
Today, 08:02
Joined
May 12, 2003
Messages
45
I have a really long report that wouldn't fit into one report file, so I had to break it up into two reports. When I preview the main one and hit print I want it to print both the main report and the other one that is a related to it. I tried creating a macro but then when I hit print it only printed the second report. What can I do to make this work???
 
I had just posted something similiar, so heres what i did.

Take all portions of both reports and stick them in the detail section. Place a Page break inbetween them, and it will print the report on 2 pages. If there is a header or footer section, it will try repeating them on the section page, so set thier heights to zero then turn them off.

If this wont resolve the issue, the you should be able to do it in VBA. Heres the code I used, it behind a cmd button named Command19. It turns all prompts off, then it prints the report, turn the warnings back on, sets focus back to the data entry txt area, then disables the cmd button.

Private Sub Command19_Click()
DoCmd.SetWarnings False
DoCmd.OpenReport "rptFinal", acViewNormal, "", "", acNormal
DoCmd.SetWarnings True
Me.txtContractNum.SetFocus
Me.Command19.Enabled = False

Hope one of these helps.

End Sub
 
Well here is the problem with what you did.
1) I tried putting everything into the details section with pagebreaks, but it is too long to fit in the space allocated for the details page, so I had to make 2 reports into it.
2) I am not using a form so I cant put code behind a command button. For the report we are using the client doesnt want a form. They just want to print the report as is.
So I still dont know what to do, besides telling them to open up the 2 reports and printing them both, which is kinda sloppy.
 
On the Report_Open event, open the other Report also. Type this into the vba window behind the Report_Open Event. (Or alternatively you could use the Report_Close which you may find tidier)

Docmd.Openreport "SecondReportName"
 

Users who are viewing this thread

Back
Top Bottom