Zoom Report on opening

T

Tom Bock

Is there a "DoCmd" function that automatically zoom's the report to 100%
when it opens up?

Thanks,
Tom
 
F

fredg

Is there a "DoCmd" function that automatically zoom's the report to 100%
when it opens up?

Thanks,
Tom
If you open the report from a command button event on a form, you can
use:
DoCmd.OpenReport "ReportName", acViewPreview
DoCmd.RunCommand acCmdZoom100

If yiou also wish to make sure the report opens Mxximized, just add
DoCmd.Maximize to the above.
 
T

Tom Bock

Fred:

Thanks for the info.... something doesn't work though (since I'm not using a
command button).

Instead of the command button, I call the report from the
"Report Switchboard" - "Preview Reports".

Just like I already have put into the Event properties, the DoCmd.Maximize
function, I'd tried to implement the Zoom feature. Both lines that you
suggested throw an error though. Any ideas?

Thanks,
Tom
 
F

fredg

Fred:

Thanks for the info.... something doesn't work though (since I'm not using a
command button).

Instead of the command button, I call the report from the
"Report Switchboard" - "Preview Reports".

Just like I already have put into the Event properties, the DoCmd.Maximize
function, I'd tried to implement the Zoom feature. Both lines that you
suggested throw an error though. Any ideas?

Thanks,
Tom

Tom,
If you are using the Switchboard made by the Access Switchboard
Manager (with a maximum of 8 buttons) you are using command buttons.
However, you are extremely limited as to what commands you can use.
That's one reason most developers do not use it.

For a long range solution to many of the inherent problems assiociated
with the Access switchboard, I would suggest you start now and make
your own switchboard(s).
Start with an unbound form. Add a command button for each report you
wish to run (If you use the command button wizard, it will even supply
the coding for you). Change the coding for the Report you wanted to
open at 100 Zoom to include the RunCommand line after the
DoCmd.OpenReport stDocName line.

If you wish to continue using the present switchboard for your forms,
and queries, etc. just change one of the button's on the main
switchboard to open this new Report's switchboard instead of the
current one.
 
T

Tom

Fred:

Again, thanks for sharing the info w/ me. I see, that makes sense. I'll
look into it and create my own switchboard.

Thanks,
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top