Solved

Access database through VB6

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now