Min/Maxing forms thru other forms

Brum

Registered User.
Local time
Today, 13:56
Joined
Aug 28, 2001
Messages
10
Hi,

Any idea how I make a form/report maximise (and minimise) through the click of a button on a different form that's open?

It sounds an easy question but I'm struggling!

TIA

Andi
 
I would assume that you want to open (or switch to) a report or form, and maximize it. Just enter the code: DoCmd.Maximize on the OnActivate event of the form or report that you want maximized.
 
Not quite. I have a modal form running in the background the whole time which blocks the user from seeing Access.

But I also have a command button (on a different form) that opens up a report. With the modal form open, the user can't see the report. So what I'd like to do is minimise the modal one, but not the whole database.

That make sense? Hmmmm.
 
Im not good at this sort of thing but what is preventing you...

Using the DoCmd.Minimise on the OnClick event of the button?

and then when the report is closed (OnClose event) selecting Maximise?

Either that or tell it to close the modal form on opening the report and on closing to open the modal form again...
 
The DoCmd.Minimise only works for the form the code is in. Or at least I can't seem to find a way to make it apply to a different form.

I think the answer lies somewhere around this sort of idea though.

Anyway, thanks for your help (so far!) guys.

Andi
 
Go to Microsoft's website and do a search for this article Q175066. They have a sample database that I think will help you.
 
Simply set the visible property of your modal form to false when previewing the report and true when closing the report.
The code is Forms!YourFormName.Visible=False.
HTH
 
Thanks a lot guys, I'm sorted now.
 

Users who are viewing this thread

Back
Top Bottom