Set Report Zoom to 90%

M

Marie

When a report is open in preview mode, you can go to the Zoom button on the
toolbar at the top of the screen, type in a zoom percent different from what
is in the list and the magnification changes to whatever you typed in. When
I open a report in code, I would like to set the zoom to 90%
programatically. There are RunCommand acZoom constants for 75% and 100% but
no 90%. I tried using acZoom90 but get an error message. Can the zoom be set
programatically to 90%? How?

Thanks!

Marie
 
R

Richard Bernstein

ZoomControl may be undocumented, but its been working for me:

strRpt = "xyz"
docmd.openreport strRpt, acViewPreview
Reports(strRpt).ZoomControl = ZOOMPERCENT

Where ZOOMPERCENT is a public constant declared in a module
Public Const ZOOMPERCENT As Integer = 90

Richard Bernstein
 
A

Allen Browne

That's cool, Richard.

Looks like it has to be set after the report is open, i.e. Report_Open and
Report_Activate are too early.

Setting ZoomControl to zero achieves a size-to-fit.

Setting ZoomControl to 1 generates an error:
There isn't enough free memory to update the display.
Close unneeded programs and try again
Maybe it's not completely reliable, hence undocumented.
 

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

Top