Article ID: 148834
Article Last Modified on 1/19/2007
DoCmd.RunCommand acCmdAppMaximize DoCmd.RunCommand acCmdAppMinimize DoCmd.RunCommand acCmdAppRestoreIf you are using Automation, you can use the following methods:
application.DoCmd.RunCommand acCmdAppMaximize application.DoCmd.RunCommand acCmdAppMinimize application.DoCmd.RunCommand acCmdAppRestoreThis article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual.
Option Explicit
Global Const SW_SHOWNORMAL = 1
Global Const SW_SHOWMINIMIZED = 2
Global Const SW_SHOWMAXIMIZED = 3
Declare Function ShowWindow Lib "User32" (ByVal Hwnd As Long, _
ByVal nCmdShow As Long) As Long
Function MaximizeAccess()
Dim Maxit%
Maxit% = ShowWindow(hWndAccessApp, SW_SHOWMAXIMIZED)
End Function
Function MinimizeAccess()
Dim Minit%
Minit% = ShowWindow(hWndAccessApp, SW_SHOWMINIMIZED)
End Function
Function RestoreAccess()
Dim Restoreit%
Restoreit% = ShowWindow(hWndAccessApp, SW_SHOWNORMAL)
End Function
Action FunctionName
-----------------------------
RunCode MinimizeAccess()89597 How to Minimize, Maximize, and Restore MS Access
Microsoft Access, "Building Applications with Microsoft Access 97," Chapter 12, "Using Library Databases and Dynamic-Link Libraries"
Additional query words: hWND Win32 API
Keywords: kbhowto kbprogramming KB148834