How do you maximize the size of the databse window automatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a setting somewhere so that when you open an access database it
maximizes the size of the window?
 
Hi, Tim.
Is there a setting somewhere so that when you open an access database it
maximizes the size of the window?

No. However, you may run code or an Autoexec macro that maximizes the
Database Window upon opening the database. Use the DoCmd.SelectObject( )
method to do so. For a VBA procedure that does this, try:

Public Function maximizeDBWindow() As Boolean

On Error GoTo ErrHandler

DoCmd.SelectObject acForm, "Form1", True
DoCmd.Maximize
maximizeDBWindow = True

Exit Function

ErrHandler:

MsgBox "Error in maximizeDBWindow( )." & vbCrLf & vbCrLf & _
"Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
Err.Clear

End Function

.... where Form1 is the name of any form in the database.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
69 Camaro: This has been driving me nuts for a long time, but I don't
understand your response. My skill level is good, but I don't know how to do
what you suggested. Could you elaborate?

Thanks
 
Assuming that by "database window", you mean the Access application itself,
I don't believe what Gunny's suggesting will maximize the size of the
database window. What it does is maximize your forms in whatever size the
database window is.

However, the code in http://www.mvps.org/access/api/api0019.htm at "The
Access Web" is supposed to be able to maximize the Access window.
 
Assuming that you have Form designated as the Start-up Form, do you know how
to write code for the Form_Open Event of this Start-up Form?

If you do then you need only the following statement in the Event Procedure:

DoCmd.RunCommand acCmdAppMaximize
 
I did this by simply creating a macro in Access called autoexec.

I have one action, MAXIMIZE and it automatically opened the database to the
maximized size.

Hope this helps someone.
 

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

Back
Top