MS Access, control zoom property on Open Reports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Running a Report from docmd. open report whenever opening a report from
default zoom of 100% to 80%. Not sure, how, have tried to it on "on Open
event"
no luck, any help would be appreciated
 
Running a Report from docmd. open report whenever opening a report from
default zoom of 100% to 80%. Not sure, how, have tried to it on "on Open
event"


Place the line:

DoCmd.RunCmd acCmdZoom75
or
DoCmd.RunCmd acCmdFitToWindow

immediately after the OpenReport line.

Sorry, there's is no option for 80% See RunCommand in Help
for the other options.
 
Richard Tsang said:
Running a Report from docmd. open report whenever opening a report
from default zoom of 100% to 80%. Not sure, how, have tried to it on
"on Open event"
no luck, any help would be appreciated

I'm not sure exactly what you have in mind, but consider this example
routine:

'----- start of example code -----
Sub OpenAndZoomReport(ReportName As String)

On Error GoTo Err_OpenAndZoomReport

DoCmd.OpenReport ReportName, acViewPreview
DoCmd.Maximize
RunCommand acCmdFitToWindow
'**OR** RunCommand acCmdZoom75 ' or other zoom constants

Exit_OpenAndZoomReport:
Exit Sub

Err_OpenAndZoomReport:
MsgBox Err.Description, _
vbExclamation, _
"Error " & Err.Number & " Opening Report"
Resume Exit_OpenAndZoomReport

End Sub

'----- end of example code -----

I've also seen an article on the Access Web that says you can use the
report object's undocuments ZoomControl property to zoom it to an
enormous range of magnifications, not just those with predefined
RunCommand constants. See
http://www.mvps.org/access/reports/rpt0020.htm .
 
"Marshall Barton" wrote
Dirk said:
Ah, but that link I posted purports to do that.


No matter how many times I browse through that site, there
always more that I've missed.

I was having trouble with my Something New Everyday
objective yesterday so your post is doubly welcome ;-)
 
Back
Top