?
Solved

Access 2007 opens in print preview rather than report view

Posted on 2010-09-22
10
Medium Priority
?
789 Views
Last Modified: 2012-05-10
I'm having an issue with no matter what I do, my report keeps opening in print preview and I want it to open in report view.   I'm using Access 2007 on XPSP3.

This is what I have done:
In the property sheet I've set - Default View = Report View, All Report View = Yes

I created the following event:

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenReport "Report_SCS Database Query", acViewReport
End Sub


I'm not an Access guru, any help would be appreciated.
0
Comment
Question by:esauseesau
[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
  • 6
  • 3
10 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33734391
use a command button in a form to open the report in preview

private sub btnPreview_click()
DoCmd.OpenReport "Report_SCS Database Query", acViewPreview

end sub
0
 

Author Comment

by:esauseesau
ID: 33734602
I don't want it to open in print preview, I want it to open in report view.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33734838
oh, sorry...

try , from the Navigation pane double-click the report to open it in Report view

0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 33735159
or from codes

private sub btnReportView_click()
DoCmd.OpenReport "Report_SCS Database Query", acViewReport

end sub
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 33735219
your code:

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenReport "Report_SCS Database Query", acViewReport
End Sub

Implies that you are using the Open event of one report to Open another report.  Is that really what you want to do?

I'm still trying to figure out what the difference between acViewReport and acViewPreview is.  Only difference I see is that acViewReport does not have the same ribbon as acViewPreview
0
 

Author Comment

by:esauseesau
ID: 33738292
"your code:

Private Sub Report_Open(Cancel As Integer)
DoCmd.OpenReport "Report_SCS Database Query", acViewReport
End Sub

Implies that you are using the Open event of one report to Open another report.  Is that really what you want to do?

I'm still trying to figure out what the difference between acViewReport and acViewPreview is.  Only difference I see is that acViewReport does not have the same ribbon as acViewPreview"


No after open the report and enter the parameter to query, it opens in print preview and I would like it to open in report view.   All of the above I've done was just from information I've obtained through Google and tried not really knowing what I was doing or why.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33738423
as i posted open the report from a commnd button  in a form

see http:#a33735159 

also, what is this  "enter the parameter to query"  what parameter is this?

you can pass this parameter using codes ...

private sub btnReportView_click()

' you can enter the parameter here and pass it as a Where clause before opening the report

DoCmd.OpenReport "Report_SCS Database Query", acViewReport

end sub
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33738728
and , delete the codes that you have on the open event of the report.
0
 

Author Comment

by:esauseesau
ID: 33738962
When you run the query in brings up an input box where the user enters a last name to query.  That's what I meant by parameter.
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33738993
is the query the record source of the report?

post the SQL statement of the query..  or better upload a copy of your db.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

765 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