Solved

How do I print & preview an access report

Posted on 2000-05-05
1
171 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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

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