open form maximize

  • Thread starter Thread starter Jean-Paul
  • Start date Start date
J

Jean-Paul

Hi,
I use following code to open a form

DoCmd.OpenForm "Bedrijven", , , , , acDialog

How can I force the form to be opened maximized?

Thanks
 
You can add DoCmd.Maximize just after your other code, BUT you must first
remove the acDialog part (or else it won't - as far as I know).

--

Thanks,

Bob Larson
Access MVP

Free Access Tutorials and Resources: http://www.btabdevelopment.com
 
acDialog means the forms popup and modal setting are set to yes, why do you
need popup or modal if you are maximising the form? The Modal setting means
that this form has to have the focus, you cant click outside the modal form.
However, if Maximised, then all other controls on other forms are hidden by
the maximised form? (or am I thinking incorrectly?)

The way I would maximise is by using the form which is to be opened "On open
event" with the code (Open the form that you want maximised, select the forms
properties > on Open > Code Builder)

Private Sub Form_Open(Cancel As Integer)
DoCmd.Maximise
End Sub


Then you don't need to change your code for opening the form

Does this help or have I got your problem totally wrong???

Kindest Regards
Mike B
 
Back
Top