Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 176
  • Last Modified:

Access database through VB6

I have a VB6 application that I would like to have the ability to open and view an Access database report and print it.  Is there a way to do that?

0
sjmmajor
Asked:
sjmmajor
1 Solution
 
_agj_Commented:
Set a reference to teh MS Access library in references:

sub makeRPT()

Dim acApp As Access.Application
Dim rpt As Access.Report

acApp.OpenCurrentDatabase "DBPath"     'path of db to open
Set rpt = acApp.CreateReport(acApp.CurrentDb, ReportTemplate)    'ReportTemplate is name of rreport tmplate.

rpt.Print

end sub
0
 
sjmmajorAuthor Commented:
Does the person have to have access.exe on their computer?
0
 
JNSTAUBCommented:
no , you may use ADO and cristal report without access on the client computer, a lot of dll will be  provide with the package that you will create.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now