# Visual Basic > Visual Basic FAQs >  [FAQ's: OD] How do I resize Access' windows?

## RobDog888

There are a few ways to resize Access: 
1.) Resize an Access Child window (Maximize to the Parent Access window or restore).
2.) Resize the main Access Parent window (Maximize or resize to a certain size).
3.) Method 1 + 2.

Code in a standard Module or behind a Form...

VB Code:
'1. Maximize/Restore Access Child windows
Option Explicit
Option Compare Database
 Private Sub MaximizeOrRestoreChild()
    Application.DoCmd.Maximize
    'Or
    Application.DoCmd.Restore
End Sub

VB Code:
'2. Resize/Maximize Access main window to a certin size
Option Explicit
Option Compare Database
 Private Declare Function SetWindowPos Lib "user32.dll" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
 Private Sub ResizeApp()
    'Resize main app window to 700 high x 1000 wide
    'x and y are the orgin of the top/let corner 
    'cx and cy are the size of the window.
    Application.RunCommand (acCmdAppRestore)
    SetWindowPos Application.hWndAccessApp, 0, 0, 0, 700, 1000, 0
End Sub
 Private Sub MaximizeApp()
    Application.RunCommand (acCmdAppMaximize)
End Sub

VB Code:
'3. Maximize Access main window and Maximize any child windows
Option Explicit
Option Compare Database
 Private Sub MaximizeAll()
    Application.RunCommand (acCmdAppMaximize)
    Application.DoCmd.Maximize
End Sub

VB Code:
'3. Resize Access main window to a certin size and Maximize any Child windows
Option Explicit
Option Compare Database
 Private Declare Function SetWindowPos Lib "user32.dll" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
 Private Sub ResizeAppMaxChild()
    'Resize main app window to 700 high x 1000 wide
    'x and y are the orgin of the top/let corner 
    'cx and cy are the size of the window.
    Application.RunCommand (acCmdAppRestore)
    SetWindowPos Application.hWndAccessApp, 0, 0, 0, 700, 1000, 0
    Application.DoCmd.Maximize
End Sub

----------

