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 (
[email protected])
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