Solved

How do I print & preview an access report

Posted on 2000-05-05
1
174 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

726 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