?
Solved

Access-Launch report from BtnSelect_Click Procedure

Posted on 2010-08-26
8
Medium Priority
?
453 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 2000 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

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