Solved

Access-Launch report from BtnSelect_Click Procedure

Posted on 2010-08-26
8
449 Views
Last Modified: 2013-11-28
How do I launch my report, "Report Report" from within my BtnSelect_Click VBA procedure?
0
Comment
Question by:Missus Miss_Sellaneus
[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
  • 4
  • 3
8 Comments
 
LVL 4

Accepted Solution

by:
javaftper earned 500 total points
ID: 33535840

Private Sub BtnSelect_Click()

DoCmd.OpenReport "Report Report", acViewNormal

End sub
0
 
LVL 12

Author Comment

by:Missus Miss_Sellaneus
ID: 33535900
Thats printing the report.  How do I run the report in preview mode?. (as if running by double clicking on the report.)
0
 
LVL 12

Author Comment

by:Missus Miss_Sellaneus
ID: 33535943
found acPreview...


The report preview is opening underneath my form. How do I make it open on top of my form?
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33536224
Turn off the Modal or Pop-up property of the form...
This is what stops other things form opening on top of it.

Or,...
Depending on your version of Access, you can can try this on the code that opens the report:

DoCmd.OpenReport "YourReportName", acViewPreview
Reports!YourReportName.SetFocus

;-)

JeffCoachman
0
 
LVL 12

Author Comment

by:Missus Miss_Sellaneus
ID: 33536411
I tried this:

DoCmd.OpenReport "Report Report", acPreview
Reports!Report Report.SetFocus

It doesn't like the second line, apparently this is either because there is a space in my report name or because Report is a reserved word. I tried putting Report Report in quotes.

"Modal" is how I was able to make the form not fill the entire screen.  Is there another way to do that?
0
 
LVL 12

Author Comment

by:Missus Miss_Sellaneus
ID: 33536857
Changed Pop-up for the report to "Yes" to make the report open on top of the form.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33538491
<Reports!Report Report.SetFocus>
,It doesn't like the second line, apparently this is either because there is a space in my report name >
Yes, please do not use spaces in your object names for this reason, and adopt a standard naming convention:
http://www.xoc.net/standards/default.asp

...but to fix this as is use this:
    Reports![Report Report].SetFocus

;-)

Jeff
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 33538555
How was the first post a solution, when you stated that it did not work?
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

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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.

738 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