Maximize?????????

D

Derek Brown

Hi All

I have a pop up that when closes leaves the main form not maximized. Why the
main form does not stay maximised I do not know. This sometimed happens when
the report which gets parameters from the pop upform is minimized. This
effects the state of the main form (Why???) I have searched help and the
best I got was:

Private Sub Form_Close()
DoCmd.SelectObject acForm, "FormName", True
DoCmd.Restore
End Sub

Or:

Private Sub Form_Close()
DoCmd.SelectObject acForm, "FormName", True
DoCmd.Maximize
End Sub

But all that happens is the Database window maximizes and leaves the Main
Form (FormName) not maximized..

Help

P.S. is there a proper word for "Not Maximised"? (as if it's a life
threatening problem).
 
M

Marshall Barton

Derek said:
I have a pop up that when closes leaves the main form not maximized. Why the
main form does not stay maximised I do not know. This sometimed happens when
the report which gets parameters from the pop upform is minimized. This
effects the state of the main form (Why???) I have searched help and the
best I got was:

Private Sub Form_Close()
DoCmd.SelectObject acForm, "FormName", True
DoCmd.Restore
End Sub

Or:

Private Sub Form_Close()
DoCmd.SelectObject acForm, "FormName", True
DoCmd.Maximize
End Sub

But all that happens is the Database window maximizes and leaves the Main
Form (FormName) not maximized..

P.S. is there a proper word for "Not Maximised"? (as if it's a life
threatening problem).


I don't know if this accounts for all the problems, but the
last argument of True means you are working in the database
window. If you want to operate on an open form, it should
be False.

The word for not maximized and not minimized is restored, as
in:
DoCmd.Restore
 
D

Derek Brown

Hi Marshall

Well you got me there. Why it should be DoCmd.SelectForm = "False" and not
"True" is beyond me but you are right it works.

Thank you
 

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