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

Open a ms access report from a excel macro

Status
Not open for further replies.

Malc8179

MIS
Oct 8, 2007
28
GB
Hi Guys

Has anbody an idea how to open a ms access report from a bit of code i need to write in excel
 
Take a look on Automation with Microsoft Access

Code:
Dim objAccess As Object 'Access.Application

Set objAccess = CreateObject("Access.Application")
objAccess.OpenCurrentDatabase FullPathAndNameOfDatabase
objAccess.DoCmd.OpenReport ....

objAccess.Quit
Set objAccess = Nothing
[code]
 
Thanks

this code sends it to a printer (great) but i also need to view it
 
Malc8179

This sends it to the printer
docmd.OpenReport "YourReportName", acViewNormal

and this to your screen for preview
docmd.OpenReport "YourReportName",acViewPreview
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top