Solved

Code for viewing report in "Report View"

Posted on 2008-06-26
6
567 Views
Last Modified: 2013-11-28
Hello,

Currently I have the following code to view my report

DoCmd.OpenReport "rptResults", acViewPreview, , sFilter

That code brings up the report in "Print Preview" view. Could you please help me out with the pre-built code which will bring out the report in "Report View"?

Thanks and appreciate your help!
0
Comment
Question by:Dingo212
6 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 300 total points
ID: 21878468
Maybe

acReportView

The correct syntax should be available in the Intellisense drop down when you type the code in VBA

docmd.OpenReport "rptResults",    
right after the comma                 ^

you should get a drop down list of options ...
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 21878573
DoCmd.OpenReport "Report Name", acViewDesign

>which will bring out the report in "Report View"?
Just to play devil's advocate here, why do you want to progammatically open a report in Disign View?
0
 
LVL 75
ID: 21878590
jHo .... it's A2007 ... with the new "Report View' ... I think ....

mx
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 65

Expert Comment

by:Jim Horn
ID: 21878639
oic.  wth is 'Report View'?
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 200 total points
ID: 21878644
Dingo212,

MX's intellisense tip should have gotten you the answer, ...but just in case here it is:
Docmd.OpenReport "YourReport", acViewReport

JeffCoachman
0
 
LVL 2

Expert Comment

by:larowlan
ID: 24276861
Be wary of using acReportView with older versions of access, it prints the page immeadiately
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access Crosstab Query with Multiple Values 4 32
Calculation in Access 5 25
DCount Type Mismatch 2 21
Filter a form 8 14
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…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

776 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