By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,968 Members | 1,610 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,968 IT Pros & Developers. It's quick & easy.

Changing Window States of Reports/Forms

P: n/a
I have used VBA to code the opening of a report as follows:

stDocName = "WarrantyListUnitSpecific"
DoCmd.OpenReport stDocName, acPreview, , "UnitType = '" & uType & "'"
DoCmd.Maximize
Form_frmUnitTypeSelection.SetFocus
DoCmd.Close

The DoCmd.Maximize maximizes not only the Report but also the
Switchboard with the Switchboard on top. I would like the Report on
top. Also, when the user closes the report, I want the focus to be
back on the Switchboard.

I have tried DoCmd.Restore in the Close event of the Report without
success.

Can anyone assist?

Tammy
MY****************@wi.rr.com (remove MYEMAILIS and the 822 to get my
actual address). THANKS!!!

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Tammy,

Remove these lines from the open report procedure.
DoCmd.Maximize
Form_frmUnitTypeSelection.SetFocus
DoCmd.Close

Put the
DoCmd.Maximize
on the open event of your report and
DoCmd.Restore
on the close event of your report.

Your report will open full screen on top of everything and when you close it
the
DoCmd.Restore
will make your switchboard the normal size.

Regards,
Barry

"FireGeek" <fi*********@hotmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
I have used VBA to code the opening of a report as follows:

stDocName = "WarrantyListUnitSpecific"
DoCmd.OpenReport stDocName, acPreview, , "UnitType = '" & uType & "'"
DoCmd.Maximize
Form_frmUnitTypeSelection.SetFocus
DoCmd.Close

The DoCmd.Maximize maximizes not only the Report but also the
Switchboard with the Switchboard on top. I would like the Report on
top. Also, when the user closes the report, I want the focus to be
back on the Switchboard.

I have tried DoCmd.Restore in the Close event of the Report without
success.

Can anyone assist?

Tammy
MY****************@wi.rr.com (remove MYEMAILIS and the 822 to get my
actual address). THANKS!!!

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.