Click to See Complete Forum and Search --> : Access Reports from VB
Hollie
Nov 19th, 2000, 07:41 AM
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.
Bigley
Nov 20th, 2000, 08:04 AM
Do a search on this topic or for topics related to my user name because I have answered this question before
Hollie
Nov 20th, 2000, 08:20 AM
Thanks
Bigley
Nov 21st, 2000, 02:46 AM
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
Hollie
Nov 21st, 2000, 04:51 AM
Thanks Again - It really helped me out
H.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.