|
-
September 17th, 2001, 11:21 PM
#1
From VB6 code call a report designed in MS-Access
I designed some report templates inside MS-Access 2000, so I'd like call and display them inside my program that written in Visual Basic 6.0. How to do this ?
-
September 18th, 2001, 01:16 AM
#2
Re: From VB6 code call a report designed in MS-Access
I have never done this so I can't tell you how. But if this was my problem I would look at using the Microsoft Snapshot Viewer OCX as a possible solution.
(While previewing this post, the following hyperlink did not highlight properly. You'll have to highlight it then cut-and-paste into your URL address bar)
http://support.microsoft.com/directo...icle.asp?ID=KB;EN-US;Q175274
-
September 18th, 2001, 02:01 AM
#3
Re: From VB6 code call a report designed in MS-Access
'// Reference:- MS-Access 9.0 Object Library
Dim appAccess As Access.Application
Set appAccess = New Access.Application
appAccess.OpenCurrentDatabase ("Path of your DB")
appAccess.DoCmd.OpenReport "Report Name", acPreview, , strYourCriteriaOptional
appAccess.DoCmd.OutputTo acOutputReport, "Report Name", acFormatSNP, "c:\temp.snp", True
appAccess.Quit
Set appAccess = Nothing
'//The line with "c:\temp.snp" is where it will save the Snapshot, If you really want to save it, you can change the name and path.
'// I save it to a temp file because I have no use for it, so it gets deleted each time I run a report.
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
|