Mohammad Alsolaiman
asked on
keep a form maximized
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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 "nameOfSomeControlOnThisFo rm"
DoCmd.Maximize
End Function
Now, from the dialog form, do this:
Forms("YourSecondForm").Ma ximizeMe
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 "nameOfSomeControlOnThisFo
DoCmd.Maximize
End Function
Now, from the dialog form, do this:
Forms("YourSecondForm").Ma
ASKER
Thank u 4 reply
I'll try it and refer back 2 u
I'll try it and refer back 2 u
DoCmd.Restore
or
DoCmd.Maximize