programmatically previewing a report -- and waiting

  • Thread starter Thread starter jfp
  • Start date Start date
J

jfp

From a button on a form i want to:
open a report in preview mode and allow the user to browse through it;
wait until the user closes the report before the code continues
So -- I open it in Dialog mode:

DoCmd.OpenReport strReport, acViewPreview, , , acDialog, strParent

THis works -- but i am unable to increase the size of the preview window
(i can magnify the print by clicking on the report, but i can only have
a small window that shows a full page in a font too small to read or a
half page when the font is magnified). If i change the acDialog above
to acwindowNormal, then i can resize the preview window but i do not get
the desired wait until done.

ALSO --

if i first open the report and minimize it and then close it prior to
opening it in dialog mode:

DoCmd.OpenReport strReport, acViewPreview, , , acIcon, strParent
DoCmd.SelectObject acReport, strReport
DoCmd.Close
DoCmd.OpenReport strReport, acViewPreview, , , acDialog, strParent

The "Close" does not appear to do anything -- thus, the subsequent
Openreport simply restores the previously opened (not Dialog mode) copy.
(Note that it now is in a larger window that is also resizeable)
(Putting "DoCmd.Restore" prior to the Close does not seem to matter.)

ANY ideas ??
 
Cancel the second half of the previous post -- i had this:
DoCmd.Close
Instead of
DoCmd.Close acReport, strReport, acSaveNo

BUT -- i still would like dialog mode WITH a resizeable window.
-=-=-=
 
Back
Top