I have reports made in MS Access. Is there some way to show MS Access reports using vb...
Shahab Ahmed
VB Code: 'Set A Reference to MS Access Object Library Private Sub cmdPreview_Click() Set Axs = CreateObject("Access.Application") Axs.Visible = True Axs.RunCommand acCmdAppMaximize Axs.OpenCurrentDatabase ("c:\yourdb.mdb") Axs.DoCmd.OpenReport "TheReportName", acViewPreview Axs.DoCmd.Maximize Axs.Quit End Sub
'Set A Reference to MS Access Object Library Private Sub cmdPreview_Click() Set Axs = CreateObject("Access.Application") Axs.Visible = True Axs.RunCommand acCmdAppMaximize Axs.OpenCurrentDatabase ("c:\yourdb.mdb") Axs.DoCmd.OpenReport "TheReportName", acViewPreview Axs.DoCmd.Maximize Axs.Quit End Sub
thanx hack, but the problem is that whether this will work on a system where MS Access is not installed.
anyone pls???????
Forum Rules