A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Starting Access Maximized



 
 
Thread Tools Display Modes
  #1  
Old April 27th, 2004, 04:27 PM
Novice
external usenet poster
 
Posts: n/a
Default Starting Access Maximized

I have created a database with a form that comes up as an
initial menu. Unfortunately, the form isn't maximized
inside Access, but is windowed.

I have noticed that whenever the database window is
maximized, the form will maximize too.

How can I default Access to start Maximized?

Sorry this may sound simple, but I'm a simple guy.

Thanks for any help.
  #2  
Old April 27th, 2004, 05:31 PM
Howard Brody
external usenet poster
 
Posts: n/a
Default Starting Access Maximized

Try setting the form to maximize when it opens.


----- Novice wrote: -----

I have created a database with a form that comes up as an
initial menu. Unfortunately, the form isn't maximized
inside Access, but is windowed.

I have noticed that whenever the database window is
maximized, the form will maximize too.

How can I default Access to start Maximized?

Sorry this may sound simple, but I'm a simple guy.

Thanks for any help.

  #3  
Old April 27th, 2004, 05:39 PM
Wayne Morgan
external usenet poster
 
Posts: n/a
Default Starting Access Maximized

Right click the shortcut to Access, choose Properties, on the Short Cut tab
go to Run and change Normal Window to Maximized.

You could also do this in the form's Load event. I just tried the following
code from the API Guide distributed by AllAPI.Net and it worked. There may
be more here than is necessary, I haven't gone through it to see if any of
it can be removed.

Option Compare Database
Option Explicit
Private Const SW_MINIMIZE = 6
Private Const SW_MAXIMIZE = 3
Private Type POINTAPI
x As Long
y As Long
End Type
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Type WINDOWPLACEMENT
Length As Long
flags As Long
showCmd As Long
ptMinPosition As POINTAPI
ptMaxPosition As POINTAPI
rcNormalPosition As RECT
End Type
Private Declare Function ClientToScreen Lib "user32" (ByVal hwnd As Long,
lpPoint As POINTAPI) As Long
Private Declare Function GetWindowPlacement Lib "user32" (ByVal hwnd As
Long, lpwndpl As WINDOWPLACEMENT) As Long
Private Declare Function SetWindowPlacement Lib "user32" (ByVal hwnd As
Long, lpwndpl As WINDOWPLACEMENT) As Long
Dim Rectan As RECT

Private Sub Form_Load()
'Tip submitted by pyp99 )
Dim WinEst As WINDOWPLACEMENT
Dim Punto As POINTAPI
Dim rtn As Long
WinEst.Length = Len(WinEst)
'get the current window placement
rtn = GetWindowPlacement(Application.hWndAccessApp, WinEst)
Rectan = WinEst.rcNormalPosition

'set the new min/max positions
'these 2 lines probably aren't needed just to maximize the Access
window
Punto.x = 100
Punto.y = 100
'initialize the structure
WinEst.Length = Len(WinEst)
WinEst.showCmd = SW_MAXIMIZE
WinEst.ptMinPosition = Punto
WinEst.ptMaxPosition = Punto
WinEst.rcNormalPosition = Rectan
'set the new window placement (minimized)
rtn = SetWindowPlacement(Application.hWndAccessApp, WinEst)

'Now maximize the form
DoCmd.Maximize

End Sub


--
Wayne Morgan
MS Access MVP


"Novice" wrote in message
...
I have created a database with a form that comes up as an
initial menu. Unfortunately, the form isn't maximized
inside Access, but is windowed.

I have noticed that whenever the database window is
maximized, the form will maximize too.

How can I default Access to start Maximized?

Sorry this may sound simple, but I'm a simple guy.

Thanks for any help.



  #4  
Old April 27th, 2004, 06:01 PM
Jim/Chris
external usenet poster
 
Posts: n/a
Default Starting Access Maximized

To open up the application in maximized mode
in a macro
Action: RunCommand
Command: AppMaximize

In code
DoCmd.RunCommand acCmdAppMaximize

Jim
-----Original Message-----
I have created a database with a form that comes up as an
initial menu. Unfortunately, the form isn't maximized
inside Access, but is windowed.

I have noticed that whenever the database window is
maximized, the form will maximize too.

How can I default Access to start Maximized?

Sorry this may sound simple, but I'm a simple guy.

Thanks for any help.
.

  #5  
Old April 27th, 2004, 06:45 PM
external usenet poster
 
Posts: n/a
Default Starting Access Maximized

This was my original question. How do I get it to default
to Maximized?


-----Original Message-----
Try setting the form to maximize when it opens.


----- Novice wrote: -----

I have created a database with a form that comes up

as an
initial menu. Unfortunately, the form isn't

maximized
inside Access, but is windowed.

I have noticed that whenever the database window is
maximized, the form will maximize too.

How can I default Access to start Maximized?

Sorry this may sound simple, but I'm a simple guy.

Thanks for any help.

.

  #6  
Old April 27th, 2004, 07:01 PM
Rick Brandt
external usenet poster
 
Posts: n/a
Default Starting Access Maximized

wrote in message
...
This was my original question. How do I get it to default
to Maximized?


In the OpenEvent of your form have code...

DoCmd.Maximize.

This will not maximize Access on your desktop, but will maximize the form
within the Access window.


--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.