Hi, I am Using VB 6 and access 2000, I have Developed a program with VB, and everything is there but now I need VB to take a Report made in Access, how do I do that?
FoFa's code is good -- the following works too, assuming the Access Reference Library is added to your project.
Code:
Dim acApp As Access.Application
Set acApp = New Access.Application
'path to DB file
acApp.OpenCurrentDatabase ("\\servername\FolderXYZ\DB1.mdb")
acApp.DoCmd.OpenReport "Rpt1" 'send rpt to printer
acApp.CloseCurrentDatabase