Launching reports contained in an external MDB

  • Thread starter Thread starter Scott M
  • Start date Start date
S

Scott M

Using Access 2003, I am trying to run a report that lives in another MDB.

My construct is as follows:
There are two databases. One has compiled code (MDE), the other has reports
(MDB). Both contain linked tables to a common SQL server. I want to invoke
a report from the MDE that resides in the MDB and in doing so need to be
able to manipulate some of the report properties.

I am looking for direction as to how I might go about this. My goal is to
end up with an MDE that calls reports contained in a separate MDB.

Thanks in advance!
ScottM
 
In Access 2003, there is no way to call a report
from outside the mdb. From outside the mdb, you
must either

a) load a separate Access object with the target
mdb (the report is 'inside' the separate Access
object):
set objdb = CreateObject("MyReports.mdb")
set objApp = objdb.application
objapp.docmd.openreport "myreport"

or

b) load the report mdb as a library mdb (Tools |
References), and call a VB code procedure in the
report mdb to open the report:

OpenLibReport "myReport"

sub OpenLibReport(sReportName)
docmd.openreport sReportName
end sub


(david)
 

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

Back
Top