I have a report in Access 2007 that is opened by pressing a button on a form. This button triggers an OpenReport macro, where the report is told to open in Print Preview view, and Dialog window mode.
How can I manually set the size of this window, along with the opening zoom level?
In the properties of the report, both AutoResize and FitToPa开发者_开发知识库ge have been set to No. However, I have tried other combinations and had no luck.
Any help is much appreciated.
You could always set the windows position and size in the OnOpen event. Use the SetWindowPos
function to do this. You can find out how to use it here.
I don't think there is a way to set the zoom level.
This is a two part solution. First, in order to resize your window you must set the Document Window Options to "Overlapping Windows" located under Access Options then CUrrent Database.
Now you will be able to resize your dialog window.
Once you are done, save the form and verify it's the size you want by opening it.
If you prefer to have a tabbed document rather than overlapping window you can switch back now and it will retain the correct dialog size.
It's a little convoluted but it works.
精彩评论