Viewing a report from a form

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
 
F

fredg

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
 
L

Lisa

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
 
P

Peter Dave

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
 
L

Lisa

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.


.
 

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