We help IT Professionals succeed at work.

Access Report Print Preview locking up the screen

fabi2004
fabi2004 asked
on
621 Views
Last Modified: 2017-04-27
Help.  I've seen a few other posts about this but they all seem to say, don't use it like this.  I'd REALLY like to use this as is, if there is a workaround to the locking up problem.

I have a report with a command button on it.  The report opens in report view (called from a form or other button somewhere else).  Once the report is open in report view, I want to give users the option to "output to" using a command button that changes the view to PrintPreview with the ribbon that now allows printing and exporting.  There is also a button on the ribbon which closes PrintPreview and returns the form to Report view.  I want all this functionality available.

The problem is that once the report is in PrintPreview, the window locks up.  Nothing is clickable or movable in any way.  Moving away from the application and then back to it seems to solve the problem.  But, I need to solve it without leaving the app.

The button on the report is a simple macro RunMenuCommand PrintPreview.  I've seen other posts on the web that indicate this problem also occurs using VBA.

Has anyone see this before or heard of a fix/workaround?
Comment
Watch Question

CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
I would not attempt to change the current view.  Just use the OpenReport with acNormalView to print.

I don't ever use ReportView.  I was very excited when I first read about the new feature in A2007 because I thought it would be useful for doing drill-down reporting and using a report in place of a search form which would give me better grouping control.  However, turned out that ReportView doesn't run my code or do page breaks so I gave up on it.

Author

Commented:
I was really hoping to use all that functionality on the Print Preview Ribbon.  It's perfect for what I need to give the users options to print, save to pdf, export to a few different formats, etc.

Any other way I can call up that ribbon without sending the report into PrintPreview?

Author

Commented:
I did notice that if I manually click File, Print, Print Preview, the screen does not lock up.

And if I move to another open app and back to access, the frozen screen starts working again.  

If I could make use of either of those to come up with a workaround?
CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
I don't want the normal/initial view of the report to have page breaks and look smaller on screen.

I guess I can tell the users that they'll have to click away from the app and back to it before they can export/print from that screen.  That seems easier than removing the button and explaining to them that they have to go to File-Print-Print Preview  to get the export/print/save options.
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
I can understand not liking the smaller view and you can get around that by maximizing the report when it opens.  Of course, this will maximize the form also so it is a slippery slope and you'll have to set the forms size back to normal.

Author

Commented:
If this has been a bug since Access 2007 and we're now using Access 2016, you'd think MS would have addressed it by now. :-(

Author

Commented:
Do you know how I can check to make sure my current window is the "active view"?
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
You're preaching to the choir.  I write to Microsoft frequently with complaints like this but not enough people actually take action.  Mostly, they just complain to each other so MS never sees the complaints so they never get fixed no matter how many versions they span.  I'm still writing to them about stupid changes they made in A2007 that broke functionality from earlier versions.  Current users don't even know that the previous version of the navigation pain (sic), which was called the database window, actually worked like window explorer.  A2007 was a huge change and I can tell from the stupid stuff that that team NEVER actually worked with Access and so they had no clue what they were breaking.  Much of it was different for the sake of being different.
Jeffrey CoachmanMIS Liason
CERTIFIED EXPERT
Most Valuable Expert 2012

Commented:
But let's take a step back...
The report opens in report view (called from a form or other button somewhere else).  Once the report is open in report view, I want to give users the option to "output to" using a command button that changes the view to PrintPreview
...why not simply open the report in Print Preview?
Then you will have the "Output" buttons available on the ribbon

There is also a button on the ribbon which closes PrintPreview and returns the form to Report view.
You can right click the report and do this...

once the report is in PrintPreview, the window locks up.
Yes, ...I see now, ...this is odd
Again, ...if you right click the report and select "Print Preview", ...then the buttons are "Clickable".

JeffCoachman

Author

Commented:
Hi Jeff,

I actually want the report in Report view initially because it's larger and easier to read and scroll through.  IF the user wants to print/export/email the report, then they can click the button "output to" and the report goes to PrintPreview with the Print Preview ribbon across the top with all the options available.

To get users to use the right-click to access the Print Preview, I'd have to have some sort of message or prompt for them to do that.  They wouldn't automatically know.

BTW, I check the right-click option.  From Report View right-click to Print Preview, the ribbon controls and entire window still freeze up.

OK, Pat & Jeff...my workaround for now is to use a message box.  Once the user clicks OK on the message box, all the ribbon controls become accessible.

Private Sub cmdOutputTo_Click()
    DoCmd.OpenReport "rptOverviewByMonth", acViewPreview
    MsgBox "Please use the Ribbon Menu above to Print/Email/Export this report."
End Sub

Now...this would be less annoying to users if I could run it invisibly.  Any idea how to hide the Msg box and automatically click ok?
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
No but I think that hiding the message box would probably result in locking.  The message box is probably waking Access up.

Author

Commented:
Ah, ok, makes sense.

I've tried many different things to unfocus and refocus on the report and get the ribbon options to work, but a dialog box is the only thing that works other than moving away from Access altogether and coming back to it.

Right-clicking from Report view into Preview only greys out the Close Preview button.  But it doesn't become available until an option that generates a dialog box is used.

This problem doesn't show up at all using Print Preview on a command button on a form.

I guess it could be a problem in my db.  But it's happening for all reports in it.

Author

Commented:
Thanks for the feedback guys.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.