How to disable Restore Button of the Form

I

Irshad Alam

Few days earlier, I found a tip on the Newsgroup to how to Disable to Access
Close Button (x) on the form.
I copied the code from the microsoft webpage and was able to do it.

Now my need is to disable the restore button of the Forms.
Generally I hide/remove the control button , maximize button and minimize
button of the Form. But my all the form are on maximized position. So the
restore button remains.

I want to disable the restore button of the form.

Requesting to the professionals for advise.

regards.
 
J

Jeff Conrad

in message:
Few days earlier, I found a tip on the Newsgroup to how to Disable to Access
Close Button (x) on the form.
I copied the code from the microsoft webpage and was able to do it.

Now my need is to disable the restore button of the Forms.
Generally I hide/remove the control button , maximize button and minimize
button of the Form. But my all the form are on maximized position. So the
restore button remains.

I want to disable the restore button of the form.

Requesting to the professionals for advise.

Hi Irshad,

To have the best of both worlds with a *maximized* form and no restore
button is to use the code found here:

http://www.mvps.org/access/api/api0022.htm

I use it all the time and it works great.
 
I

Irshad Alam

Sir ..Thanks..for your advise.
But please note that I want to disable to restore button of the form. As my
forms are always in maximized position.
regards.
 
J

Jeff Conrad

in message:
Sir ..Thanks..for your advise.
But please note that I want to disable to restore button of the form. As my
forms are always in maximized position.
regards.

Irshad,

The link I provided *does* exactly what you require.
It will not show the Restore button and give the form a "maximized" look.
Trust me, I have been using it for years.

Here is what you need to do:

1. Copy and paste all the code from the following link into a new
standard module:

http://www.mvps.org/access/api/api0022.htm

2. Compile the code and save the module as basMaximizeForm.

3. Now pick one form for testing. Open it Design View and go
to the code window. Presumably you have a DoCmd.Maximize
statement in the Form's Open, Activate, or Load event. Remove
that code from your code window.

4. Replace the DoCmd.Maximize statement with this:

MaximizeRestoredForm Me

5. Compile the code, save and close the form.

6. Now open the form in normal view. You will see that the form
will fill the available space below the menu and toolbars, but the
Restore button will not be shown.

7. Just repeat for each form.
 

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