Solved

Access database through VB6

Posted on 2003-10-27
3
168 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String manipulation in Visual Basic 7 73
Getting warning: You are about to delete 1 row(s) 9 52
Recommendation vb6 to vb.net or others 14 175
VB6 ListBox Question 4 48
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

856 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