Opening Multiple Reports from a Single Switchboard Item

whdyck

Registered User.
Local time
Today, 14:23
Joined
Aug 8, 2011
Messages
169
I'm using MS Access 2003.

(Probably a dumb question ....)

I'd like to open multiple reports simultaneously when I click on a given Switchboard item. (The reports are really a set--one should not be opened and printed without the others.)

So what's the best way to do this? Do I run some kind of macro? (Never done that before.) Do I spawn the extra reports in the VBA of the report that is referenced by the Switchboard?

Thanks for any help you can give.

Wayne
 
1. Create a function in a standard module to open the reports you want:
Code:
Public Function OpenMyReports()
   DoCmd.OpenReport "ReportName1Here"
   DoCmd.OpenReport "ReportName2Here"
' and just add additional lines like that (putting the right report name) 
End Function
2. Then use the RUN CODE switchboard option for your switchboard option.
 
Thanks, Bob! Just what I needed.
 
After adding my third report to the list of reports to open (in the function), I get the following error:
Run-time error 3048: Cannot open any more databases
Is Access keeping the Jet connections open after displaying each report? (The third report was the simplest report of all.)

Any ideas on how to resolve this?

Thanks.

Wayne
 
After adding my third report to the list of reports to open (in the function), I get the following error:

Is Access keeping the Jet connections open after displaying each report? (The third report was the simplest report of all.)

Any ideas on how to resolve this?

Thanks.

Wayne

Are you using any combo boxes or listboxes on your reports (you shouldn't be, but if you are that can cause problems).
 
There are no combo boxes or list boxes on the reports.
 
If I chain the reports to open one-by-one by adding a single command to each report's Close event, I can get them all to open, in turn.

As long as a report is open, does it retain its connections to the database engine? I would have thought that as soon as it dumps its data to the screen, it's done and can drop the connections.

Wayne
 

Users who are viewing this thread

Back
Top Bottom