minimize form and minimize Access

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
 
D

Dirk Goldgar

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
 
K

Keven Denen

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
 
B

Boon

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
 
B

Biz Enhancer

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

End Sub

Worked for me

HTH
Nick.
 
B

Boon

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Form_Resize & Minimize 1
Minimize a form 2
Access 2007 Pop up form Issues 1
Form resize event 4
Minimize form using Menu 8
Minimize on open 5
Minimize + NotifyIcon 1
2007 Ribbon: minimize using code 2

Top