Maximize?????????

  • Thread starter Thread starter Derek Brown
  • Start date Start date
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).
 
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
 
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
 
Back
Top