Ironically I just logged on to Tek-Tips to look for this very issue. However, I quickly switched over to my application and tried it and got a runtime error 2046 -- "Command or action 'Zoom75%' isn't available now -- etc etc says I am in an older unconverted db or a read only db none of which is true. (I'd put a screen shot of the message but can't seem to do that here)
Ok, I found the issue. You can't use it in the Open event of the report. You have to issue it from the form you're calling the report. So go into the command button opening the report and you'll see this:
Thanks *very* much for the tip. It seems so odd to me that it has to be handled this way much less that it is so convoluted to accomplish something as basic as setting the display size of a report. Oh Well.............
I was actually running the reports from the switchboard manager which I am already committed to in the app so end users could add reports as they needed to. I had to put the code snippet you gave me in a module (one for each report)and call that from the swithcboard. I also had to put a DoCmd.Restore in the close event of each report to put the switchboard form back to its desired size on return. All of this will mean moving away from the end-user but I'm glad to have it in any case.
There is another constant -- acCmdZoomBox that I tried both in the on Open and in the code approach both of which produced the "Not Available" error. Time permitting, I'd like a clue as to what this might do. Also a hint on where I might find a reasonably readable and comprehensible documentation on these intrinsic constants.
I'd like to give you another three stars for your help even though I slipped through the cracks initially. It was worth the wait.
acCmdZoomBox - no idea what it does, I also looked into it and couldn't find anything of worth. If that changes, I'll let you know.
Listing of constants - search help on the RunCommand function, there is a link to all of the constants access has, documentation of each individual one is slim. There are a couple web sites that are trying to document them, you might try looking for them on google.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.