Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • 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!

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

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

bernardb (Vendor)
25 Jan 09 19:02
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?
Dontremb (TechnicalUser)
26 Jan 09 12:58
bernardb,

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.
jollivier (Programmer)
23 Jul 09 18:01
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!
Ray1127 (Programmer)
24 Jul 09 16:29
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.
 
jollivier (Programmer)
11 Aug 09 17:01
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.

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