We help IT Professionals succeed at work.

keep a form maximized

Medium Priority
271 Views
Last Modified: 2012-06-21
Hi:
I have two forms opened at the same time
The one at the back is opened as normal maximized form
The one at the front is opened as a dialog
There is a button in the second form(the dialog one) , this button is to open a report, and at the same time it is make the (the dialog form) invisible.
When I close the report, I make the (dialog form) visible again.
but the first form (which is at the back) appear as restored (I mean not maximized).
I did not understand why access act like that.
What can I do to make it remain maximized?
Please.

Comment
Watch Question

Scott McDaniel (EE MVE )Infotrakker Software
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
Try this in the Activate event of that form:

DoCmd.Restore

or

DoCmd.Maximize
application programmer
Commented:
The concentrate now is at the dialog form which is on the front
And the form at the back is restored now(not maximized).
I need a code to maximize the form at the back. But this code I need to write it in the other form(dialog form).
How can I point to (form1) from (form2) to do this maximization of (form1).
I am not sure if I describe my problem well?

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Scott McDaniel (EE MVE )Infotrakker Software
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014

Commented:
Sorry I missed your comment:

you can refer to other forms like this:

Forms("YourSecondForm")

In order to maximize this other form from your dialog form, try this:

Add a code procedure to the Second form (the one you want to maximize):

Function MaximizeMe()
  DoCmd.SetFocus "nameOfSomeControlOnThisForm"
  DoCmd.Maximize
End Function

Now, from the dialog form, do this:

Forms("YourSecondForm").MaximizeMe

Mohammad Alsolaimanapplication programmer

Author

Commented:
Thank u 4 reply
I'll try it and refer back 2 u

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.