Solved

Access-Launch report from BtnSelect_Click Procedure

Posted on 2010-08-26
8
450 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
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: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 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