Open Multiple Reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report which is based on a temporary local table built from data
located on a network. So when the user opens the report I build the temporary
table with ADO and open the report bound to the temp table on the users
system. The report criteria is typically different each time the report is
opened.
I would like to open the report multiple times with different criteria so
the users could view them simultaneously. I saw a post on doing this with
forms
When I attempt to open the report a second time, the temp table is locked by
the first report.

I suppose I could base the report on the recordset that creates the temp
table and rename the report on the fly and on close delete the report.

Or is their a way to release the locks on the temp table so I can rebuild it
and open the second report.

Please point me in the right direction

Thanks for help, Im in the process of changing from Paradox to Access.

Scott
 
I tried heading down the copy report trail. After creating the report
recordset based on the users creiteria, execute something like this. The
record set is rsTest and the base or seed report is rptFromRecordSet.

'Open Seed Report
DoCmd.Echo False
DoCmd.OpenReport "rptFromRecordSet", acViewDesign

'Assign Peports Record Source
Reports("rptFromRecordSet").RecordSource = rsTest.Source
DoCmd.Close acReport, "rptFromRecordSet", acSaveYes

'Close Reports Record Source
rsTest.Close

'Copy Report Using Query Critiera as As New Name
DoCmd.CopyObject , "rptFromRecordSet" & Critiera, acReport,
"rptFromRecordSet"

'Open New Report
DoCmd.OpenReport rsListFor!PartNo, acViewPreview
DoCmd.Echo True

So now I end up with many viewable reports, and probally a can of worms too.

I tried to delete the reports on close event but no go because they arent
closed. I guess I could write a method to do this. But what if the user exits
Acess with the reports open, Im left with all these reports.

Should I be looking at the report collection to weed out these temp reports
when Access closes. AKA delete all reports that arent "Seed" reports.

Am I heading down the wrong road?

Thanks
Scott
 
Back
Top