First go to Project>>References, and select Microsoft Access 8.0 Object Library, or whatever the most current version is. Then do this
Dim objAccess As New Access.Application
Set objAccess = CreateObject("Access.Application"
objAccess.OpenCurrentDatabase ("C:\dbname.mdb"
objAccess.DoCmd.OpenReport "reportname",acViewPreview
'use acViewPreview or it will print right away
objAccess.DoCmd.Maximize
objAccess.CloseCurrentDatabase
Set objAccess = Nothing
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.