Solved

Code for viewing report in "Report View"

Posted on 2008-06-26
6
570 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 - Microsoft MVP, Access and Data Platform) 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
Familiarize people with the process of utilizing SQL Server functions 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 Microsoft Ac…

828 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