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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How an I run a report from another database

Status
Not open for further replies.

sk8er1

Programmer
Jan 2, 2005
229
US
We have a report in one of our databases that we want to be able to run in another database. We have very strict security, my manager does not want to give access to that database to a whole group in order to run a report.

What is the best way to overcome this....
Can I link to the tables, then import the query and report.
Would that work.
 
You could connect to the database and then run the report. However, I think the easiest way would be to simply reference the 2nd database. To do that, simply open a module in the first database, select Tools|Reference and browse to your second database. In the second database, create a public function that opens the report.

Public Function OpenTheReport()

Docmd.OpenReport "YourReport"

End Function

To open the report, simply call the function OpenTheReport from the first database (i.e. via onclick event of command button or whatever)

Sub cmdButton_OnClick()

OpenTheReport

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top