Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preview same report several times

Status
Not open for further replies.

cp950

Programmer
Dec 18, 2000
19
0
0
US
I need to simultaneously preview the same report several times, each with a different filter. Then the user shall close or print the open report(s) they desire.

I created a button that does the series of "DoCmd.OpenReport" commands, each with a different filter. The code compiles and runs, but I only receive the FIRST request. I am sure I'm getting no messages or errors.

I have serched Knowledgebases and Helps, but I cannot seem to phrase my question correctly to get my answer.

Thanks in advance!!
 
Ehat you are trying to do, you can't do directly. You can only have one instance of a specific report open at a time.

One way to get around it (not very graceful, I admit) is to create as many copies of the report as you want open, and then open those since you CAN have multiple reports open.

So if the report is called "rptMainReport", and you want to open it four times, each with different criteria. Make three copies, "rptMainReport_1", "rptMainReport_2" and "rptMainReport_3". Now use 4 docmd.openreport's to open each one with it's own specific criteria.

Tim Gill
Gill Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top