open form maximize

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
 
B

Bob Larson

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
 
M

MikeJohnB

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
 

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