Printing Access Report from VB Program

  • Thread starter Thread starter Robyn
  • Start date Start date
R

Robyn

Does anyone have a vb program written to print an access
report without the person being able to open the database
in access? Thanks
 
Robyn:

To print an Access report, Access (full or run time) must be launched as
there is no other app that can instantiate and print an Access report.

You can however do it from automation quite easily as in:

Dim objAcc as Object
Set objAcc = CreateObject("Access.Application")
With objAcc
.OpenCurrentDatabase("PathToTargetDb")
.DoCmd.OpenReport "YourReport"
DoEvents
.Quit
End with
Set objAcc=Nothing
 
Back
Top