Hi everybody!
Can i print Access Report from vb6 form?Any help is Appreciated!
Printable View
Hi everybody!
Can i print Access Report from vb6 form?Any help is Appreciated!
SureWhere "MyReport" is the name of the Access report and DBPath is the path to your database.VB Code:
'Set A Reference To Microsoft Access Object Library Private Sub cmdPrintReport_Click() Set Axs = CreateObject("Access.Application") Axs.OpenCurrentDatabase (DBPath) Axs.DoCmd.OpenReport "MyReport" Set Axs = Nothing Axs.Quit End Sub
Please note that in order for this to work the machine must have Access installed in addition to your database that contains the report.