Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable Close Button on Maximized form

Status
Not open for further replies.

Sjoker

Programmer
Aug 4, 2000
30
NL
In a form I use DoCmd Maximize and I've set the properties
to false for the close button, but it reappears.
How do I get rid of the button ? [sig][/sig]
 

You are refering to the 'control box' in the upper right hand corner of the window. Simplest way is to set the forms frame property to 'none'. This eliminates the 'control box' all together. When done, the Maximize action will then take on new characteristics however. You'll have to try it to see if it give you an 'acceptabe' effect.

[sig]<p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br> [/sig]
 
you can also enable/disable the close button directly either at design time...

set the form property &quot;Close Button&quot;, under the format tab of the properties window, to False/True

or in a program with a VBA statement like...

Me.CloseButton = False

this will just gray-out the close button
& does not remove it from the windows frame
[sig][/sig]
 
We wouldn't kid ya'. ;-)

The property is not available at run time...further, setting the property at design time (ie. 'CloseButton' = false) works fine as long as you don't Maximize the form. If you do, the Close Button becomes available again...

Try it yourself and you'll see why dennie has asked the question. [sig]<p>Amiel<br><a href=mailto:amielzz@netscape.net>amielzz@netscape.net</a><br><a href= > </a><br> [/sig]
 
OK, I'm 1/2-way (maybe 3/4) a bozo!

At design time the button can be disabled in Access 2000. I don't know about other versions. The button disappears when the form is maximized & reappears as grayed-out upon reshrinking. This I tested.

BUT! even in Access 2000 you CANNOT change the button programmatically. Again I tried & no go.

Amiel & Dennie, my apologies.

100 times...
I will test before I post! I will test before I post! I will... [sig][/sig]
 
rafe is great! And we have one thing in common... test... test... test... [sig]<p>John A. Gilman<br><a href=mailto:gms@uslink.net>gms@uslink.net</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top