|
-
Nov 15th, 1999, 05:15 PM
#1
Thread Starter
New Member
Can anyone tell me how easy (or difficult) it is to integrate an Access97 report into a VB6 app. If it is easy, a simple explanation of how to do it would be greatly appreciated.
Thanx in advance
Steve
-
Nov 16th, 1999, 12:53 PM
#2
Guru
It's not too bad with a little automation:
User must have Access installed on system -- Add a reference to the Access Object Library.
Dim axs As New Access.Application
axs.OpenCurrentDatabase ("c:\data\path\here.mdb")
axs.DoCmd.OpenReport "ReportNameHere", acViewNormal
axs.CloseCurrentDatabase
Set axs = Nothing
This will print the report -- but as far as complete integration with your app (without MS Access) I do not believe that you can access the report like you can with a table or query.
HTH
Tom
-
Nov 18th, 1999, 01:27 AM
#3
Guru
check out the second and third parameters of the DoCmd function, you can specify a filter and/or a where condition. Otherwise, you can access the report via the axs.reports collection and manipulate report properties there (like set the SQL statement of the recordsource before you print it). I didn't try it myself, let me know if you have problems.
Tom
-
Nov 18th, 1999, 12:43 PM
#4
Thread Starter
New Member
Thanks Tom, that works great. Any idea about how to give my a report a parameter from VB. Any info will be greatly appreciated.
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
|