button commands

  • Thread starter Thread starter Darryl
  • Start date Start date
D

Darryl

Greetings,
I am running Access 2000. I have a button on a form. I want the button to
cause
two different reports to be printed in sequence. Ie, report A prints, Then
Report B.

I have tried subreports, but that screws with the report headers/footers and
generally
is ugly when you have a complex SQL query.

thanks,
Darryl
 
Don't really understand what your problem is.
In the click event of the button put the code

DoCmd.OpenReport "Report A"
DoCmd.OpenReport "Report B"

Does this not open the 2 reports in the right sequence ?
 
If you used the Wizard to create the Print button (I assume that's what your
button is for), then
you were prompted for the report you want to print, at the time you ran the
wizard to create the button.
Modify the code behind this button. Two lines to duplicate.

stDocName = "ReportA"
DoCmd.OpenReport stDocName, acNormal
stDocName = "ReportB"
DoCmd.OpenReport stDocName, acNormal

This should print your two reports... one after the other.
 
Back
Top