Access 2003 reports with parameters and VB 6.0

G

Guest

Hi, All
I am using VB 6.0 front end and Access 2003 is back end, i created queries
with parameters and reports (data source are those queries), it works when i
double click on any report and then enter parameters in the prompt boxes,
How can i use my reports from VB application, i can print reports w/o
parameters
like this:
Set objAccess = New Access.Application
With objAccess
.DoCmd.OpenQuery strDB, acViewPreview, acReadOnly
.OpenCurrentDatabase (strDB)
.DoCmd.OpenReport strReportName
.DoCmd.Close acReport, strReportName
.Application.CloseCurrentDatabase
End With
If Not objAccess Is Nothing Then
objAccess.Quit
Set objAccess = Nothing
End If

Please, help where can i get some info on printing reports from VB and
reports data source are queries (saved in db) with parameters in Access 2003.
 
G

Guest

Hi Elena,

I would use something like Crystal Reports that can be embedded into VB6.
The inbuilt VB6 report writer is alright if your reports are VERY basic, but
for anything else you would need a third party tool. This is a cleaner
solution than trying to trigger Access to open and display a report.

Hope this helps.

Damian.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top