|
-
Nov 19th, 2000, 08:41 AM
#1
Thread Starter
Lively Member
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.
 Just trying to muddle through...
-
Nov 20th, 2000, 09:04 AM
#2
Hyperactive Member
Do a search on this topic or for topics related to my user name because I have answered this question before
-
Nov 20th, 2000, 09:20 AM
#3
Thread Starter
Lively Member
 Just trying to muddle through...
-
Nov 21st, 2000, 03:46 AM
#4
Hyperactive Member
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
-
Nov 21st, 2000, 05:51 AM
#5
Thread Starter
Lively Member
Thanks Again - It really helped me out
H.
 Just trying to muddle through...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|