Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Why does print preview lock up and not allow me to navigate the report pages while in preview?

Posted on 2015-01-22
8
Medium Priority
?
1,366 Views
Last Modified: 2015-01-28
In Access 2007, I have a report on which I put three buttons, Save (to pdf), Close, and Print. The print is actually mapped to open in print preview. This was because the report contains a lot of information on one page, yet the person needed bigger font. Print Preview has a scroll bar to to magnify the information. My thought is to eliminate the ribbon from the users' view so that they have less options to mess with the database design, otherwise I would direct people to the print preview in the ribbon.

When I open in Print Preview, the view ceases to respond to the mouse and only by clicking on something else, like the task bar, and then coming back to the print preview screen, can I then navigate the print preview pages and other toggles. Is there some setting or coding to overcome this obstacle? The report print preview opens with an embedded macro, but I could switch that to VBA. But if the answer is in VBA, you'd need to walk me through it miniscule step by step.

I do now see at the bottom right of the screen that there is another magnifying glass, which is actually a print preview button, so I might just direct users to that.

But, if I can get the report print preview button to work without locking up the view navigation, I think that would be the best route for our users.
0
Comment
Question by:David Bigelow
[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 74

Expert Comment

by:Jeffrey Coachman
ID: 40565102
Also confusing is this:
I have a report on which I put three buttons, Save (to pdf), Close, and Print.
This seems to be the reason for the odd behavior.
(I was able to recreate)

Why not open the report from a "form"
Then all should function normally

Am I not understanding something?
Why pen a report in Report View, ...just to reopen the report in Print Preview?

JeffCoachman
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 2000 total points
ID: 40565289
Oh...

Try changing your code to something like this...
    DoCmd.Close acReport, "YourReportNameHere"
    DoCmd.OpenReport "YourReportNameHere", acViewPreview

....this seems to avoid this issue.
Let me know
;-)

JeffCoachman
0
 
LVL 85
ID: 40566717
My thought is to eliminate the ribbon from the users' view so that they have less options to mess with the database design, otherwise I would direct people to the print preview in the ribbon.
A better way to do this would be to provide the user with your own custom ribbon, which includes those commands you want the user to interact with.

See this site for a great tool for working with the ribbon: www.ribboncreator.com
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 1

Author Comment

by:David Bigelow
ID: 40567217
Jeff: see question below.

Scott: Love the idea. Nearing publishing deadline, I don't want to start a new idea.

Jeff: This close/open code works great for one report, but the second report is generated from a form of four comboboxes for a total of 16 different possibilities of reports, based on the various usages or non-usages of the comboboxes.

Is there a way I could have this code requery the source form for it's current parameters listed in the comboboxes?

I'm not familiar enough yet with looping, so on my form I made a series of 16 conditions in the macro tool with all the possible null/not null scenarios available for the four comboboxes. The report is generated off those scenarios, based on which condition was matched.

So, I would need something that would requery that form before opening the report in print preview. The form is "frm_TrainingByEe", with two tabs: "sfm_Shifts_Banks" and "sfm_Sups_Ees". Each tab has four comboboxes and the report is generated from one tab or the other, not both. To me, it is interesting to note that the way I could differentiate between the two tabs in the macro conditions was by referencing the form and then differntiating any similar combo boxes with '_2'. I couldn't do it by referencing the subform. For example,

[Forms]![frm_TrainingByEe]![cbo_Supervisor_2] Is Null And [Forms]![frm_TrainingByEe]![cbo_Last_Name] Is Null And [Forms]![frm_TrainingByEe]![cbo_Flow_ID_2] Is Null And [Forms]![frm_TrainingByEe]![cbo_Queue_ID_2] Is Not Null

I could just have the report open in print preview, but personally, that is not pleasant. The report is more pixellated and you have to click on the little page forward arrow to navigate instead of using page up/down or mouse scroll. Page up/down won't advance to next page in preview. I'm just wanting a simplistic way to access print preview for those who want to magnify the report.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40567285
This close/open code works great for one report, but the second report is generated from a form of four comboboxes for a total of 16 different possibilities of reports, based on the various usages or non-usages of the comboboxes.Is there a way I could have this code requery the source form for it's current parameters listed in the comboboxes?
This seems to be unrelated to your original question:
Why does print preview lock up and not allow me to navigate the report pages while in preview?
So to be clear, ...did my modified code address your first question?

To briefly address your new concern here, ...whenever you issue the Docmd.openreport command, the report is reopened, thus it's recordsource will be refreshed.
So I am not quite sue whey you are having issues with this (unless I am not understanding the way you are doing things)
0
 
LVL 1

Author Comment

by:David Bigelow
ID: 40567371
Thank you, Jeff. Yes, the modified code addressed the first question, specifically. The first report opens directly: there are no variable parameters associated with opening the report. I can navigate in print preview freely. Hurray!

The second report is opened based on conditions specified in combo boxes on a form. Your modified code calls up and opens the second report directly, without, I think, first looking through the comboboxes on the form for any information that should be filtered out. Here's why I think that.

If in the combo boxes, I filter to select Team H, and run the report, only Team H and their training records are shown. It's about 3 pages long. Then, using your modified code behind the print button on the report, I hit print and the report opens in print preview, but it is 63 pages long - all employees and their training are listed, not just Team H. My guess is that the modified code doesn't look at the parameters in the combo boxes, just opens the full report.

The inability to navigate is addressed, I can now navigate the second report in print preview. Besides that, I need the report to open in print preview as it was filtered to open as first specified from the comboboxes.

Edit: I'm thinking about your comment regarding the record source. Here's a copy of that attached. It seems that the Filter is removed when I close and reopen the report with your code, while the record source remains. Here's the Filter from the Data tab of the Report properties; it is the matching code of one of the 16 iterations: [Bank]=[Forms]![frm_TrainingByEe]![cbo_Bank]

Bank refers to Team. In this scenario, the Bank combo box I used to specify Team H.

Edit 2: I don't understand. When I went to print preview using your code and checked the report properties, the filter was still there and was the same. Not sure why it's not showing as filtered in preview.
Report-Record-Source.PNG
Report-Filter.PNG
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40574383
If your original question has been addressed, then you should assign points to this question and post your new concerns as a new question(s).
This will give a fresh set of Experts a shot at assisting you.
I will watch for your new posts as well
;-)

JeffCoachman
0
 
LVL 1

Author Closing Comment

by:David Bigelow
ID: 40575509
If the report is opened up directly, this works. When I opened a report that was filtered by combo boxes on a form and the macro builder was set to comb through the form filters, first, this solution, though it addressed the freezing issue, did not cause the report to be opened with the macro conditions that would have filtered the report. It simply opened the full report.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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 shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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: …

610 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