Viewing a report from a form

  • Thread starter Thread starter Lisa
  • Start date Start date
L

Lisa

Dear experts,

I have a form with a control button which opens a report
and maximizes it in the window via a macro. How can I stop
the form maximising at the same time. When I return to the
form after viewing the report the form window is maximised
and I would prefer it stay small.

regards

Lisa
 
Dear experts,

I have a form with a control button which opens a report
and maximizes it in the window via a macro. How can I stop
the form maximising at the same time. When I return to the
form after viewing the report the form window is maximised
and I would prefer it stay small.

regards

Lisa

Code the close event of the report:
DoCmd.Restore
 
Sorry I am VBA ignorant and am only able to work with
macros in the macro window in the objects bar. How can I:

Code the close event of the report:
DoCmd.Restore

in the macro.

regards

Lisa
 
it's ok if you are vb code ignorant... I am macro ignorant :-

But when in report design mode, in the properties for the report itself (not an object or a section) select the EVENT ta
Click on the white area beside On Clos
Select [Event Procedure] then click on the ... button
This will open a VB editor window
Atfer the line that sayd Private Sub Report_Close(), add the text fredg suggested
DoCmd.Restor
Make sure there is nothing else on that line

That's it! Close the VBA window and you're done
 
Woo Hoo, Thank you. L.
-----Original Message-----
it's ok if you are vb code ignorant... I am macro ignorant :-)

But when in report design mode, in the properties for the
report itself (not an object or a section) select the
EVENT tab
Click on the white area beside On Close
Select [Event Procedure] then click on the ... button.
This will open a VB editor window.
Atfer the line that sayd Private Sub Report_Close(), add the text fredg suggested:
DoCmd.Restore
Make sure there is nothing else on that line.

That's it! Close the VBA window and you're done.


.
 
Back
Top