Minimize a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

have a form as a popup. I guess you might be able to use a modal...Anyhow I
use it for a menu. Command buttons that take me to other forms...etc.

Question: I have enable the minimized button on the form. Is it possible
that when I minimize my form that access minimizes with it. I have noticed
that when I minimize the form because I want to go to my windows desktop that
I have to actually minimize twice...Once for the form that is loaded and the
second time to minimize access. Can this be done, and if so please let me
know.

Thanks.
 
Brian,

Place the following into a standard module:
Private Declare Function IsIconic Lib "User32" (ByVal hWnd As Long) As
Integer

Then place the following into your form:
Private Sub Form_Resize()
If (IsIconic(Me.hWnd) * -1) Then
DoCmd.RunCommand acCmdAppMinimize
End If
End Sub

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Brian,

Sorry, change the API declaration from Private to Public:
Public Declare Function...

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
---------------------------
 
Back
Top