report in another database

S

seeker

I just posted this and now I can not find it. So here it is in programming.

I have a report that is being viewed by two departments, intake and
outreach. I have a form in an access outreach database that has a button
that I want to open a report in an access intake database. I believe that he
shell function can be used but am not sure of the parameters to be used. The
simplist would be to import report and underlying queries but want to keep
from haveing redundancy. Thank you.
 
F

fredg

I just posted this and now I can not find it. So here it is in programming.

I have a report that is being viewed by two departments, intake and
outreach. I have a form in an access outreach database that has a button
that I want to open a report in an access intake database. I believe that he
shell function can be used but am not sure of the parameters to be used. The
simplist would be to import report and underlying queries but want to keep
from haveing redundancy. Thank you.

Copy and paste this code into the Click event of the Command Button
code.

Private Sub CommandName_Click()
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "C:\ThePath\DatabaseName.mdb"
appAccess.DoCmd.OpenReport "TheReportName", acViewPreview

End Sub

Close the report and other database when done viewing the report.
 

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