Report

  • Thread starter turks67 via AccessMonster.com
  • Start date
T

turks67 via AccessMonster.com

I'm trying to open Two reports with one command button. But everytime I click
the command button it
goes to the report2. How can I open report1 click until I get to the last
page on report1 then open report2. Is this possible.
 
V

vanderghast

Maybe the easiest solution would be to open Report3 having Report1 and
Report2 as sub-report, if it is applicable in your scenario.

In the button click procedure, you can check to see if there is actually a
given report open, or not, using, among other possibilities:

if Application.SysCmd(acSysCmdGetObjectState, acReport, "myReportName") <> 0
then
DoCmd.OpenReport "myReportname", acViewPreview
else
DoCmd.OpenReport "otherReportName", acViewPreview
end if


(note that technically, you could also check to see if the second report is
already open).



Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top