Maximize / Restore

P

PaleRider

Hi,

I have a label on a form that when clicked will maximize the form. Is there
a way to set the button so that a second click will restore the form to it's
previous size?

Right now I have this code:

Private Sub lblMaximize_Click()
' Maximize the form
DoCmd.Maximize
End Sub


PR
 
E

ErezM via AccessMonster.com

change it to

Private Sub lblMaximize_Click()
Static x as Boolean

x=Not x
if x Then
DoCmd.Maximize
Else
DoCmd.Restore
End If
End Sub
 

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

Top