zoom 200% when opening report

MICHELE

Registered User.
Local time
Today, 10:01
Joined
Jul 6, 2000
Messages
117
I have been trying to open a report to automatically preview to zoom 200% using
docmd.RunCommand accmdZoom200 on the OnOpen event of my report and keep getting an error that that the command or action isn't available now with Runtime error 2046.

What am I doing wrong?
 
I had the same problem. If you put this code behind the onopen event it gives you the error message. Now, if you are opening up your report from a botton put the code in the onclick event where you are clicking to open your report. I posted the same exact question 2 weeks ago, but noboday answered!

Sohaila
 
I tried this too right after DoCmd.OpenReport stDocName, acPreview. On the next line I typed DoCmd.RunCommand acCmdZoom200 and I got the ssame error. Should I put I write it a different way?
 
I tried it again and it works now. Thanks a lot!
 
This is the exact code I have on my onclick button and it works fine!

DoCmd.OpenReport stDocName, acPreview
DoCmd.RunCommand acCmdZoom75

Are you sure you got rid of the code on your onopen event of your report?

Sohaila
 
I am glad it worked
smile.gif
 

Users who are viewing this thread

Back
Top Bottom