resize of report preview

A

Andreas

I call a preview of my report from within a form with the use of acpreview
option.
The report appears with default preview option "fit" which is very small.
How can I make it automatically apear larger or at least make the containing
window autoresize after I select another zoom level. I don't mind selecting
this myself but I want the window to resize itself accordingly
 
A

Al Campagna

Andreas,
Place this code right after the OpenReport method.
DoCmd.OpenReport "YourReport, acViewPreview
DoCmd.RunCommand acCmdZoom75
See RunCommand Method Constants in Help, for all the available Zoom values.

--
hth
Al Campagna
Candia Computer Consulting
Microsoft Access MVP - Candia, NH USA
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
M

Marshall Barton

Andreas said:
I call a preview of my report from within a form with the use of acpreview
option.
The report appears with default preview option "fit" which is very small.
How can I make it automatically apear larger or at least make the containing
window autoresize after I select another zoom level. I don't mind selecting
this myself but I want the window to resize itself accordingly


This kind of operation can be done in the form's code right
after the OpenReport line:

DoCmd.OpenReport . . .
DoCmd.Maximize 'or DoCmd.MoveSize . . .
RunCommand acCmdZoom150 'or acCmdFitToWindow

Check VBA Help for RunCommand acCommand constants to see the
other builtin zoom factors.
 
A

Andreas

Yes, that would just set the zoom level.
More important to me is how to change the window size because it is always
very small. I could change the zoom manually but you need much more time to
resize the coordinates of the window.
 
A

Andreas

Ok, its:
DoCmd.RunCommand acCmdZoom100
DoCmd.MoveSize 6000, 0, 14000, 30000

Exactly what I wanted.
Thanks to al
 

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