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.

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

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.