Option Compare Database
Option Explicit
Declare Sub SetWindowPos Lib "User32" (ByVal hWnd&, _
ByVal hWndInsertAfter&, _
ByVal X&, ByVal Y&, ByVal cX&, _
ByVal cY&, ByVal wFlags&)
Global Const HWND_TOP = 0 'Moves MS Access window to top
'of Z-order.
'Values for wFlags.
Global Const SWP_NOZORDER = &H4 'Ignores the hWndInsertAfter.
Function SizeAccess()
Dim cX As Long, cY As Long, cHeight As Long
Dim cWidth As Long, H As Long
'Get handle to Microsoft Access.
H = Application.hWndAccessApp
cX = 15
cY = 15
cWidth = 650
cHeight = 500
'Position Microsoft Access.
SetWindowPos H, HWND_TOP, cX, cY, cWidth, cHeight, SWP_NOZORDER
Application.RefreshDatabaseWindow
End Function