Report Zoom Level

C

Chuck

I would like to change the zoom level that my reports
start at each time they are opened. Is there a property
I can set of some VBA code I can use to do this?

Thanks,
Chuck
 
M

Marshall Barton

Chuck said:
I would like to change the zoom level that my reports
start at each time they are opened. Is there a property
I can set of some VBA code I can use to do this?


It's not very elegant, but you can use a line of code
immediately following the OpenReport statement:

DoCmd.RunCommand acCmdZoomXXX

where acCmdZoomXXX can be any one of:
acCmdZoom10
acCmdZoom100
acCmdZoom1000
acCmdZoom150
acCmdZoom200
acCmdZoom25
acCmdZoom50
acCmdZoom500
acCmdZoom75
acCmdFitToWindow

You may or may not want to use this as well

DoCmd.Maximize
 
G

Guest

Thanks Marsh but it's giving me an error when I try
this. It says "The command or action 'Zoom200%' isn't
available now". I tried using the zoom command in a
macro too and I get the same message. Any thoughts?

Thanks,
Chuck
 
R

Rick Brandt

Thanks Marsh but it's giving me an error when I try
this. It says "The command or action 'Zoom200%' isn't
available now". I tried using the zoom command in a
macro too and I get the same message. Any thoughts?

Where did you put the line of code? It doesn't work within the Report
itself.
 
M

Marshall Barton

Thanks Marsh but it's giving me an error when I try
this. It says "The command or action 'Zoom200%' isn't
available now". I tried using the zoom command in a
macro too and I get the same message. Any thoughts?


Did you put the DoCmd.RunCommand on the line immediately
after the DoCmdOpenReport line?

You didn't actually use the %, did you?

I guess I have to see more details before I can figure out
what you're doing differently from what I do.
 
J

J

If you are using a macro that opens your report as a part
of the macro sequence, you can add a line after when the
report opens. The action is Maximize.

This may produce undesirable results overall, but it may
work for you.

HTH
 
Top