Set Report Zoom to 90%

  • Thread starter Thread starter Marie
  • Start date Start date
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
 
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
 
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.
 
Back
Top