2003 DoCmd.Maximize Does Too Much

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

Guest

Hi folks,
Marshall Barton told me how to open a report big but,

DoCmd.OpenReport "rptAllAcctBalances", acViewPreview
DoCmd.Maximize

causes my database window to max out also?

What if, like in days of old, in C, I wanted to specify the size of the report, rather than be limited to DoCmd.RunCommand acCmdZoom(s)?
 
Here is an example of using API calls to move or resize a form. I haven't
tried modifying it for use with a report. However, I checked and the hWnd
property is available for a report also.
http://www.mvps.org/access/forms/frm0042.htm

If you maximize a window, Access will maximize all windows until you do a
restore, then all windows will be restored. One way around the problem you
mention is to use DoCmd.Restore when you close the report. However, simply
resizing the restored size of the window won't affect other windows, so
using the API calls above may also do what you want.

--
Wayne Morgan
MS Access MVP


Jim Shores said:
Hi folks,
Marshall Barton told me how to open a report big but,

DoCmd.OpenReport "rptAllAcctBalances", acViewPreview
DoCmd.Maximize

causes my database window to max out also?

What if, like in days of old, in C, I wanted to specify the size of the
report, rather than be limited to DoCmd.RunCommand acCmdZoom(s)?
 
In place of the DoCmd.Maximize command, you can use the DoCmd.MoveSize
method. Specify Top and Left offsets (relative to the application window)
and the Height and Width measurements in Twips, 1440 per inch.

Paul Johnson

Jim Shores said:
Hi folks,
Marshall Barton told me how to open a report big but,

DoCmd.OpenReport "rptAllAcctBalances", acViewPreview
DoCmd.Maximize

causes my database window to max out also?

What if, like in days of old, in C, I wanted to specify the size of the
report, rather than be limited to DoCmd.RunCommand acCmdZoom(s)?
 
Back
Top