Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximize Form when menus disappear 1

Status
Not open for further replies.
May 5, 2000
168
US
To print reports, I have a pop up form with report selections. The reports are all printed to screen first. The Print Reports Menu appears when the reports come to screen. When I close out the report and the pop-up form, it leaves a gap at the top of the screen between my main form and the standard access menu. In other words, my main form is no longer maximized.

Any suggestions on how to solve this problem.

 
I use a small macro (which I called 'Fullscreen') which is activated by the 'On Open' Property of the Main Form.

First create the new Macro (called Fullscreen), set Action to 'Maximise', save macro as 'Fullscreen'.

Then go to your form's design view, click on the Event tab, select the 'On Open' property and type (or select from the drop down) Fullscreen. Save your form.

Now each time you open the form it will be maximised.

Is this what you are trying to acheive?
 
Not exactly, that works the first time the forms is opened.

In my case, the form is still opened with a pop-up form and report printed to screen opened on top of it. When the report is closed, the print report menu disappears also, leaving an empty area at the top of the form.

The form needs to be maximized again at this point.
 
Okay I understand.
Try putting the 'Fullscreen' macro in the 'On Activate' property field. This worked for me!!
 
I almost agree but would instead put in the code for On Activate. "DoCmd.Maximise" The code is easier and macros should always be avoided if possible. This way the code is attached to the form and if the form is ever exported the macro does not need to be exported as well.
Private Sub Form_Activate()
DoCmd.Maximize
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top