Maximize or minimize form with button

I

Imran Ghani

Hi! I am working with MS Access 2007 and VBA code. I want to make my form
minimize and maximize programmatically with the help of a command button. At
the same time, moreover, I would like to change the label of my button as
such to indicate the current position of the form, either it is maximized or
mininmized. I'll appreciate valuable help in this regards. Thanks in advance.
 
G

Graham Mandeno

Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize" means
reduce it to an icon at the bottom of the screen or on the task bar, so you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have clicked to
see if the form needs maximizing or not. If so, it maximizes it and changes
the caption. If not, it restores it and changes the caption back again.
 
G

Graham Mandeno

Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize" means
reduce it to an icon at the bottom of the screen or on the task bar, so you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have clicked to
see if the form needs maximizing or not. If so, it maximizes it and changes
the caption. If not, it restores it and changes the caption back again.
 
I

Imran Ghani

Thank you for your valuable help. The caption of the button is changing, but
the form is not maximizing or minimizing. I have default menu bars on my
Access 2007 form. I'd be very greatful if you could indicate about deficiency
which is not letting me make my form maximize or minimize by the use of the
command button. Is there any other way that we can programmatically change
the dimensions of the form by clicking on the button. I am a novice and hence
appreciate your cooperation. Also please guide me about how to remove the
default menu items from the application.

Graham Mandeno said:
Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize" means
reduce it to an icon at the bottom of the screen or on the task bar, so you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have clicked to
see if the form needs maximizing or not. If so, it maximizes it and changes
the caption. If not, it restores it and changes the caption back again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Hi! I am working with MS Access 2007 and VBA code. I want to make my form
minimize and maximize programmatically with the help of a command button.
At
the same time, moreover, I would like to change the label of my button as
such to indicate the current position of the form, either it is maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
I

Imran Ghani

Thank you for your valuable help. The caption of the button is changing, but
the form is not maximizing or minimizing. I have default menu bars on my
Access 2007 form. I'd be very greatful if you could indicate about deficiency
which is not letting me make my form maximize or minimize by the use of the
command button. Is there any other way that we can programmatically change
the dimensions of the form by clicking on the button. I am a novice and hence
appreciate your cooperation. Also please guide me about how to remove the
default menu items from the application.

Graham Mandeno said:
Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize" means
reduce it to an icon at the bottom of the screen or on the task bar, so you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have clicked to
see if the form needs maximizing or not. If so, it maximizes it and changes
the caption. If not, it restores it and changes the caption back again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Hi! I am working with MS Access 2007 and VBA code. I want to make my form
minimize and maximize programmatically with the help of a command button.
At
the same time, moreover, I would like to change the label of my button as
such to indicate the current position of the form, either it is maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
G

Graham Mandeno

Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thank you for your valuable help. The caption of the button is changing,
but
the form is not maximizing or minimizing. I have default menu bars on my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove the
default menu items from the application.

Graham Mandeno said:
Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize" means
reduce it to an icon at the bottom of the screen or on the task bar, so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
G

Graham Mandeno

Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thank you for your valuable help. The caption of the button is changing,
but
the form is not maximizing or minimizing. I have default menu bars on my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove the
default menu items from the application.

Graham Mandeno said:
Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize" means
reduce it to an icon at the bottom of the screen or on the task bar, so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
I

Imran Ghani

Thanks for your advise. Please also guide, if it is due to the fact that I am
using the default menus. Do the menus have something to do with the forms'
maximizing and restoring properties. Do I have to also refer to the form's
name also when using maximizing or restoring propereties ?

Graham Mandeno said:
Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thank you for your valuable help. The caption of the button is changing,
but
the form is not maximizing or minimizing. I have default menu bars on my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove the
default menu items from the application.

Graham Mandeno said:
Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize" means
reduce it to an icon at the bottom of the screen or on the task bar, so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
I

Imran Ghani

Thanks for your advise. Please also guide, if it is due to the fact that I am
using the default menus. Do the menus have something to do with the forms'
maximizing and restoring properties. Do I have to also refer to the form's
name also when using maximizing or restoring propereties ?

Graham Mandeno said:
Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thank you for your valuable help. The caption of the button is changing,
but
the form is not maximizing or minimizing. I have default menu bars on my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove the
default menu items from the application.

Graham Mandeno said:
Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize" means
reduce it to an icon at the bottom of the screen or on the task bar, so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
I

Imran Ghani

Thanks for your guidance. Please guide me if we can also change the picture
of the command button also indicating the maximize and minimize position
along with changing the form position. Is there any specific property of the
form which should also be enabled for the form to be maximized or restored?

Graham Mandeno said:
Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thank you for your valuable help. The caption of the button is changing,
but
the form is not maximizing or minimizing. I have default menu bars on my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove the
default menu items from the application.

Graham Mandeno said:
Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize" means
reduce it to an icon at the bottom of the screen or on the task bar, so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
I

Imran Ghani

Thanks for your guidance. Please guide me if we can also change the picture
of the command button also indicating the maximize and minimize position
along with changing the form position. Is there any specific property of the
form which should also be enabled for the form to be maximized or restored?

Graham Mandeno said:
Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thank you for your valuable help. The caption of the button is changing,
but
the form is not maximizing or minimizing. I have default menu bars on my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove the
default menu items from the application.

Graham Mandeno said:
Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize" means
reduce it to an icon at the bottom of the screen or on the task bar, so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
G

Graham Mandeno

Hi Imran

Whether or not you use default menus on the form should have no bearing on
moving or resizing the form.

The DoCmd methods (Maximize, Minimize, Restore and MoveSize) affect the
currently active window, so you don't need to specify a form.

InsideHeight and InsideWidth are properties of a form object, so should be
qualified by a reference to a form - either Forms![FormName] or
Forms("FormName") or, if the code is in the form's own class module, Me.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Thanks for your advise. Please also guide, if it is due to the fact that I
am
using the default menus. Do the menus have something to do with the forms'
maximizing and restoring properties. Do I have to also refer to the form's
name also when using maximizing or restoring propereties ?

Graham Mandeno said:
Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be
working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and
also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties
is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thank you for your valuable help. The caption of the button is
changing,
but
the form is not maximizing or minimizing. I have default menu bars on
my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically
change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove
the
default menu items from the application.

:

Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize"
means
reduce it to an icon at the bottom of the screen or on the task bar,
so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have
clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back
again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my
button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
G

Graham Mandeno

Hi Imran

Whether or not you use default menus on the form should have no bearing on
moving or resizing the form.

The DoCmd methods (Maximize, Minimize, Restore and MoveSize) affect the
currently active window, so you don't need to specify a form.

InsideHeight and InsideWidth are properties of a form object, so should be
qualified by a reference to a form - either Forms![FormName] or
Forms("FormName") or, if the code is in the form's own class module, Me.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Thanks for your advise. Please also guide, if it is due to the fact that I
am
using the default menus. Do the menus have something to do with the forms'
maximizing and restoring properties. Do I have to also refer to the form's
name also when using maximizing or restoring propereties ?

Graham Mandeno said:
Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be
working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and
also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties
is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thank you for your valuable help. The caption of the button is
changing,
but
the form is not maximizing or minimizing. I have default menu bars on
my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically
change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove
the
default menu items from the application.

:

Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize"
means
reduce it to an icon at the bottom of the screen or on the task bar,
so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have
clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back
again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my
button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
G

Graham Mandeno

Hi Imran

I have not used pictures on command buttons as they are a new feature of
Access 2007. However, I believe you should be able to change them at
run-time simply by assigning another image file name to the Picture
property:

Me.cmdMyButton.Picture = "C:\Icons\NewIcon.ico"

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Thanks for your guidance. Please guide me if we can also change the
picture
of the command button also indicating the maximize and minimize position
along with changing the form position. Is there any specific property of
the
form which should also be enabled for the form to be maximized or
restored?

Graham Mandeno said:
Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be
working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and
also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties
is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thank you for your valuable help. The caption of the button is
changing,
but
the form is not maximizing or minimizing. I have default menu bars on
my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically
change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove
the
default menu items from the application.

:

Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize"
means
reduce it to an icon at the bottom of the screen or on the task bar,
so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have
clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back
again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my
button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
G

Graham Mandeno

Hi Imran

I have not used pictures on command buttons as they are a new feature of
Access 2007. However, I believe you should be able to change them at
run-time simply by assigning another image file name to the Picture
property:

Me.cmdMyButton.Picture = "C:\Icons\NewIcon.ico"

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Thanks for your guidance. Please guide me if we can also change the
picture
of the command button also indicating the maximize and minimize position
along with changing the form position. Is there any specific property of
the
form which should also be enabled for the form to be maximized or
restored?

Graham Mandeno said:
Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be
working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and
also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties
is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thank you for your valuable help. The caption of the button is
changing,
but
the form is not maximizing or minimizing. I have default menu bars on
my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically
change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove
the
default menu items from the application.

:

Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize"
means
reduce it to an icon at the bottom of the screen or on the task bar,
so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have
clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back
again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my
button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
I

Imran Ghani

Thanks for your kind help. Your code worked perfectly with the form's
maximized and restored positions. Actually the properties set in my form were
not allowing the code to work. I have changed the properties and hence it is
all working now. Can you please also guide regarding if I want to bring all
the forms' contents in centre of the form when the form is in restored
position. For the time being the contents of the form are not in the centre
of the screen when its in restored position.I also want to bring all the
other forms in my application to the same position, either restored or
maximized, as the main form. What sort of coding or properties do I need to
set to accomplish my goal.

Graham Mandeno said:
Hi Imran

I have not used pictures on command buttons as they are a new feature of
Access 2007. However, I believe you should be able to change them at
run-time simply by assigning another image file name to the Picture
property:

Me.cmdMyButton.Picture = "C:\Icons\NewIcon.ico"

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Thanks for your guidance. Please guide me if we can also change the
picture
of the command button also indicating the maximize and minimize position
along with changing the form position. Is there any specific property of
the
form which should also be enabled for the form to be maximized or
restored?

Graham Mandeno said:
Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be
working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and
also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties
is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Thank you for your valuable help. The caption of the button is
changing,
but
the form is not maximizing or minimizing. I have default menu bars on
my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically
change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove
the
default menu items from the application.

:

Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize"
means
reduce it to an icon at the bottom of the screen or on the task bar,
so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have
clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back
again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my
button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
I

Imran Ghani

Thanks for your kind help. Your code worked perfectly with the form's
maximized and restored positions. Actually the properties set in my form were
not allowing the code to work. I have changed the properties and hence it is
all working now. Can you please also guide regarding if I want to bring all
the forms' contents in centre of the form when the form is in restored
position. For the time being the contents of the form are not in the centre
of the screen when its in restored position.I also want to bring all the
other forms in my application to the same position, either restored or
maximized, as the main form. What sort of coding or properties do I need to
set to accomplish my goal.

Graham Mandeno said:
Hi Imran

I have not used pictures on command buttons as they are a new feature of
Access 2007. However, I believe you should be able to change them at
run-time simply by assigning another image file name to the Picture
property:

Me.cmdMyButton.Picture = "C:\Icons\NewIcon.ico"

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Thanks for your guidance. Please guide me if we can also change the
picture
of the command button also indicating the maximize and minimize position
along with changing the form position. Is there any specific property of
the
form which should also be enabled for the form to be maximized or
restored?

Graham Mandeno said:
Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be
working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and
also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and properties
is
the "TWIP". Are TWIP is a "twentieth of a point", which means there are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Thank you for your valuable help. The caption of the button is
changing,
but
the form is not maximizing or minimizing. I have default menu bars on
my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use of
the
command button. Is there any other way that we can programmatically
change
the dimensions of the form by clicking on the button. I am a novice and
hence
appreciate your cooperation. Also please guide me about how to remove
the
default menu items from the application.

:

Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize"
means
reduce it to an icon at the bottom of the screen or on the task bar,
so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized, not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have
clicked
to
see if the form needs maximizing or not. If so, it maximizes it and
changes
the caption. If not, it restores it and changes the caption back
again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hi! I am working with MS Access 2007 and VBA code. I want to make my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my
button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks in
advance.
 
G

Graham Mandeno

Hi Imran

I'm glad you got the Maximize/Restore working :)

If you set the form's AutoCenter property to "Yes" then the form should
center itself when it is opened. If you then maximize it and subsequently
restore it, it should revert to its previous position.

However, if you drag it to another location, then maximize/restore it, it
will stay in that new location.

If you want it to re-center itself when it is restored, then you will
require some much more serious code. Do you really want to go there?
--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thanks for your kind help. Your code worked perfectly with the form's
maximized and restored positions. Actually the properties set in my form
were
not allowing the code to work. I have changed the properties and hence it
is
all working now. Can you please also guide regarding if I want to bring
all
the forms' contents in centre of the form when the form is in restored
position. For the time being the contents of the form are not in the
centre
of the screen when its in restored position.I also want to bring all the
other forms in my application to the same position, either restored or
maximized, as the main form. What sort of coding or properties do I need
to
set to accomplish my goal.

Graham Mandeno said:
Hi Imran

I have not used pictures on command buttons as they are a new feature of
Access 2007. However, I believe you should be able to change them at
run-time simply by assigning another image file name to the Picture
property:

Me.cmdMyButton.Picture = "C:\Icons\NewIcon.ico"

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Thanks for your guidance. Please guide me if we can also change the
picture
of the command button also indicating the maximize and minimize
position
along with changing the form position. Is there any specific property
of
the
form which should also be enabled for the form to be maximized or
restored?

:

Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be
working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if
it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and
also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and
properties
is
the "TWIP". Are TWIP is a "twentieth of a point", which means there
are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Thank you for your valuable help. The caption of the button is
changing,
but
the form is not maximizing or minimizing. I have default menu bars
on
my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use
of
the
command button. Is there any other way that we can programmatically
change
the dimensions of the form by clicking on the button. I am a novice
and
hence
appreciate your cooperation. Also please guide me about how to
remove
the
default menu items from the application.

:

Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize"
means
reduce it to an icon at the bottom of the screen or on the task
bar,
so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized,
not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have
clicked
to
see if the form needs maximizing or not. If so, it maximizes it
and
changes
the caption. If not, it restores it and changes the caption back
again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
Hi! I am working with MS Access 2007 and VBA code. I want to make
my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my
button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks
in
advance.
 
G

Graham Mandeno

Hi Imran

I'm glad you got the Maximize/Restore working :)

If you set the form's AutoCenter property to "Yes" then the form should
center itself when it is opened. If you then maximize it and subsequently
restore it, it should revert to its previous position.

However, if you drag it to another location, then maximize/restore it, it
will stay in that new location.

If you want it to re-center itself when it is restored, then you will
require some much more serious code. Do you really want to go there?
--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thanks for your kind help. Your code worked perfectly with the form's
maximized and restored positions. Actually the properties set in my form
were
not allowing the code to work. I have changed the properties and hence it
is
all working now. Can you please also guide regarding if I want to bring
all
the forms' contents in centre of the form when the form is in restored
position. For the time being the contents of the form are not in the
centre
of the screen when its in restored position.I also want to bring all the
other forms in my application to the same position, either restored or
maximized, as the main form. What sort of coding or properties do I need
to
set to accomplish my goal.

Graham Mandeno said:
Hi Imran

I have not used pictures on command buttons as they are a new feature of
Access 2007. However, I believe you should be able to change them at
run-time simply by assigning another image file name to the Picture
property:

Me.cmdMyButton.Picture = "C:\Icons\NewIcon.ico"

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Imran Ghani said:
Thanks for your guidance. Please guide me if we can also change the
picture
of the command button also indicating the maximize and minimize
position
along with changing the form position. Is there any specific property
of
the
form which should also be enabled for the form to be maximized or
restored?

:

Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be
working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if
it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and
also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and
properties
is
the "TWIP". Are TWIP is a "twentieth of a point", which means there
are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Thank you for your valuable help. The caption of the button is
changing,
but
the form is not maximizing or minimizing. I have default menu bars
on
my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use
of
the
command button. Is there any other way that we can programmatically
change
the dimensions of the form by clicking on the button. I am a novice
and
hence
appreciate your cooperation. Also please guide me about how to
remove
the
default menu items from the application.

:

Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize"
means
reduce it to an icon at the bottom of the screen or on the task
bar,
so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized,
not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have
clicked
to
see if the form needs maximizing or not. If so, it maximizes it
and
changes
the caption. If not, it restores it and changes the caption back
again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
Hi! I am working with MS Access 2007 and VBA code. I want to make
my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my
button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks
in
advance.
 
I

Imran Ghani

Thanks indeed for your helpful advise. I do want to make my form to re-center
itself when it is restored. I'd appreciate much your help in this regards.
Yes, I'd like to code the form for the same purpose. Please go ahead with
your helpful code for this purpose.

Graham Mandeno said:
Hi Imran

I'm glad you got the Maximize/Restore working :)

If you set the form's AutoCenter property to "Yes" then the form should
center itself when it is opened. If you then maximize it and subsequently
restore it, it should revert to its previous position.

However, if you drag it to another location, then maximize/restore it, it
will stay in that new location.

If you want it to re-center itself when it is restored, then you will
require some much more serious code. Do you really want to go there?
--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Imran Ghani said:
Thanks for your kind help. Your code worked perfectly with the form's
maximized and restored positions. Actually the properties set in my form
were
not allowing the code to work. I have changed the properties and hence it
is
all working now. Can you please also guide regarding if I want to bring
all
the forms' contents in centre of the form when the form is in restored
position. For the time being the contents of the form are not in the
centre
of the screen when its in restored position.I also want to bring all the
other forms in my application to the same position, either restored or
maximized, as the main form. What sort of coding or properties do I need
to
set to accomplish my goal.

Graham Mandeno said:
Hi Imran

I have not used pictures on command buttons as they are a new feature of
Access 2007. However, I believe you should be able to change them at
run-time simply by assigning another image file name to the Picture
property:

Me.cmdMyButton.Picture = "C:\Icons\NewIcon.ico"

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

Thanks for your guidance. Please guide me if we can also change the
picture
of the command button also indicating the maximize and minimize
position
along with changing the form position. Is there any specific property
of
the
form which should also be enabled for the form to be maximized or
restored?

:

Hi Imran

I'm sorry, I can't think of a reason for DoCmd.Maximize not to be
working.

Can you try creating a new form with nothing on it except the
cmdToggleMaximize command button, and the event procedure, and see if
it
works then?

For moving and resizing the form, check out DoCmd.MoveSize method, and
also
the form's InsideHeight and InsideWidth properties.

You should be aware that the units for all these methods and
properties
is
the "TWIP". Are TWIP is a "twentieth of a point", which means there
are
1440 per inch.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Thank you for your valuable help. The caption of the button is
changing,
but
the form is not maximizing or minimizing. I have default menu bars
on
my
Access 2007 form. I'd be very greatful if you could indicate about
deficiency
which is not letting me make my form maximize or minimize by the use
of
the
command button. Is there any other way that we can programmatically
change
the dimensions of the form by clicking on the button. I am a novice
and
hence
appreciate your cooperation. Also please guide me about how to
remove
the
default menu items from the application.

:

Hi Imran

When you say "minimize", I assume you mean "restore". "Minimize"
means
reduce it to an icon at the bottom of the screen or on the task
bar,
so
you
wouldn't be able to see the button to maximize it again.

OK, so assuming you open the form in normal view (not maximized,
not
minimized) and you have a button named "cmdToggleMaximize" with the
caption
"Maximize form", you need a Click event procedure for that button:

Private Sub cmdToggleMaximize_Click()
With cmdToggleMaximize
If .Caption = "Maximize form" Then
DoCmd.Maximize
.Caption = "Make me small again"
Else
DoCmd.Restore
.Caption = "Maximize form"
End If
End With
End Sub

This procedure checks the caption of the command button you have
clicked
to
see if the form needs maximizing or not. If so, it maximizes it
and
changes
the caption. If not, it restores it and changes the caption back
again.

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand

message
Hi! I am working with MS Access 2007 and VBA code. I want to make
my
form
minimize and maximize programmatically with the help of a command
button.
At
the same time, moreover, I would like to change the label of my
button
as
such to indicate the current position of the form, either it is
maximized
or
mininmized. I'll appreciate valuable help in this regards. Thanks
in
advance.
 

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