Solved

How do I print & preview an access report

Posted on 2000-05-05
1
167 Views
Last Modified: 2013-11-28
I would like to preview and print an access report using VB6 interface.  Thank you for your help.
Chris
0
Comment
Question by:cdesla1
1 Comment
 
LVL 1

Accepted Solution

by:
manchula earned 100 total points
ID: 2783593
The syntax is
AccessObject.DoCmd.OpenReport <"REPORTNAME">,[view type]

Dim objAccess As New Access.Application
Set objAccess = New Access.Application
    objAccess.OpenCurrentDatabase "C:\program files\microsoft visual studio\vb98\biblio.mdb"

'Give acViewPreview to preview the report.
 
objAccess.DoCmd.OpenReport "AuthorReport", acViewPreview


The View Type has 3 options:
acViewDesign
acViewNormal(Default)
acViewPreview


acViewNormal prints the report immediately. If you leave this argument blank, the default constant (acViewNormal) is assumed.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

746 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

9 Experts available now in Live!

Get 1:1 Help Now