minimize form and minimize Access

  • Thread starter Thread starter Boon
  • Start date Start date
B

Boon

Hi,

Here is what I want it to happen --> When a user click minimize the form, I
want the Access application to minimize as well.

I put the Event procedure on the On Resize event of the form and put this
code in.

Private Sub Form_Resize()


'Check if the form is minimized
If Me.WindowHeight <= 1000 Then
' the form has been minimized, insert your code here

DoCmd.RunCommand acCmdAppMinimize

End If
End Sub


It did not work! Can you help me out? Is there a better way to do it?

Thanks,
Boon
 
Boon said:
Hi,

Here is what I want it to happen --> When a user click minimize the form,
I want the Access application to minimize as well.

I put the Event procedure on the On Resize event of the form and put this
code in.

Private Sub Form_Resize()


'Check if the form is minimized
If Me.WindowHeight <= 1000 Then
' the form has been minimized, insert your code here

DoCmd.RunCommand acCmdAppMinimize

End If
End Sub


It did not work! Can you help me out? Is there a better way to do it?

How about using the some of the code from this KB article?

http://support.microsoft.com/kb/210190
ACC2000: How to Determine If a Form Is Maximized or Minimized
 
Hi,

Here is what I want it to happen --> When a user click minimize the form,I
want the Access application to minimize as well.

I put the Event procedure on the On Resize event of the form and put this
code in.

Private Sub Form_Resize()

'Check if the form is minimized
If Me.WindowHeight <= 1000 Then
' the form has been minimized, insert your code here

DoCmd.RunCommand acCmdAppMinimize

End If
End Sub

It did not work!  Can you help me out? Is there a better way to do it?

Thanks,
Boon

I'm not sure why your's isn't working. It works perfectly fine on my
machine. What version of Access are you using?

Keven Denen
 
I am using Access 2007.

It is weird. It works on mine too but not everytime. At leaset today it
doesn't work. It goes into the loop but it just doesn't execute this command

DoCmd.RunCommand acCmdAppMinimize



Hi,

Here is what I want it to happen --> When a user click minimize the form,
I
want the Access application to minimize as well.

I put the Event procedure on the On Resize event of the form and put this
code in.

Private Sub Form_Resize()

'Check if the form is minimized
If Me.WindowHeight <= 1000 Then
' the form has been minimized, insert your code here

DoCmd.RunCommand acCmdAppMinimize

End If
End Sub

It did not work! Can you help me out? Is there a better way to do it?

Thanks,
Boon

I'm not sure why your's isn't working. It works perfectly fine on my
machine. What version of Access are you using?

Keven Denen
 
Try
Private Sub Form_Resize()
If Me.Form.WindowHeight <= 1000 Then
DoCmd.RunCommand acCmdAppMinimize
End If

End Sub

Worked for me

HTH
Nick.
 
Thanks for your suggestion but it still did not work on mine. The program
runs into the If block but did not execute the DoCmd.... command.

Thanks,
Boon
 
Back
Top