Solved

Access database through VB6

Posted on 2003-10-27
3
169 Views
Last Modified: 2010-05-03
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
Comment
Question by:sjmmajor
3 Comments
 
LVL 7

Accepted Solution

by:
_agj_ earned 250 total points
ID: 9626258
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
 

Author Comment

by:sjmmajor
ID: 9626404
Does the person have to have access.exe on their computer?
0
 
LVL 4

Expert Comment

by:JNSTAUB
ID: 9626775
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question