Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Access 2007 Print Preview Freezes Up

Access 2007 Print Preview Freezes Up

Access 2007 Print Preview Freezes Up

I have a report on which I added Print Preview command button.  The On-Click event of the button contains the following code only:

DoCmd.RunCommand acCmdPrintPreview

When the Print Preview is clicked the preview opens as expected but the entire application seems to freeze and Access does not respond to anything on any part of the screen.  I have discovered two ways to clear the situation.

1)  Bring up the task manager then immediately close it.  After this the ribbon buttons become active again and I can close the preview or use the zoom features, etc.

2)  Switch to the Access VBA window and click the Reset button.  Even though there is no indication in the code window that the code stopped or hit a failure point, this does clear the problem and the report window unfreezes and everything works normally again.

What am I doing wrong?

RE: Access 2007 Print Preview Freezes Up


Note that I am not intimately familiar with this command, so take this with a grain of salt.

Is it possible that you're telling Access to CONSTANTLY remain in PrintPreview?

Is there, perhaps, some other place you could put it that wouldn't cause it to always force it to be in PrintPreview?

Just an idea based on the fact that if you Reset your VBA, it fixes the problem.

RE: Access 2007 Print Preview Freezes Up

I am having the same problem. I have a report with a button for switching to "print preview". The on-click command for my button is slightly different from that bernardb used:

DoCmd.OpenReport "MyReport", acViewPreview

The view switches to "print preview", and both Access and the VBA window freeze-up solid. Just switching to Task Manager un-freezes access, but since the VBA window is frozen, I can't click the reset button as bernardb is able to do.

A messy workaround is to call a sub in a module which closes the report and re-opens it in print-preview using the very same command that causes Access to freeze.

I guess VB gets confuzzled when a report tries to change its own view. It's a bug, I say!

RE: Access 2007 Print Preview Freezes Up

Where is the command button located?  from your question it appears that you've put it into the report.  This would cause a problem as the preview would be calling itself.  

If this is the case take the command button out of the report and place it onto a form.  Otherwise use the preview button on the toolbar.

RE: Access 2007 Print Preview Freezes Up

The print preview button is located on a seperate form, so that's not the reason. Regardless, I have forms that have buttons to change their own view modes using "docmd.openform", and that works just fine; for some reasons, reports won't have any of it.

My reason for using a clear, labeled button is to make the database simple to use for those who would be reticent to learning the function of all of the tiny-wee un-labeled buttons on their software.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close