-
I have a program that puts information into an Access Database. I have a few reports set up on the information.
What I want to know is:
How can I run the reports from VB? I want to provide the user with a list of available reports and they select one.
Any help is greatfully appreciated.
H.
-
Do a search on this topic or for topics related to my user name because I have answered this question before
-
-
I just checked your profile and realised that you were a Scot and felt really bad for not helping out a fellow Celt so here is the code below that shows a print preview of the Catalog report from Northwind.
Set a reference to Microsoft Access object library
Private Sub Command1_Click()
Dim a As Access.Application
Set a = CreateObject("Access.Application")
a.OpenCurrentDatabase App.Path & "\NWind.mdb"
a.Visible = True
a.DoCmd.OpenReport "Catalog", acViewPreview
a.DoCmd.Maximize
End Sub
-
Thanks Again - It really helped me out
H.