Minimizing a form using a button on another form

PhilipJFry

New member
Local time
Yesterday, 20:12
Joined
Mar 8, 2011
Messages
5
Hi,

All I want to do is click a button on Form A which will then minimize Form B. The only thing I can seem to do though, is minimize Form A since DoCmd.Minimize doesn't appear to take any parameters. It's possible to launch a form from pretty much anywhere in the program... can you minimize one in the same manner?

There must be a simple way to do this, but I can't find it.

Thanks!
 
I probably hide it; untested but try setting focus to a control on that form before the minimize command.
 
Is there another way that I should be referencing Form_B? When I use Forms!Form_B!MyButton.SetFocus
I get an error saying that Access couldn't find the form "Form_B" referred to.
 
No, that looks okay, but in a brief test the method doesn't work anyway. I read help ;) which led to this:

DoCmd.SelectObject acForm, "FormName"
DoCmd.Minimize

which did work.
 

Users who are viewing this thread

Back
Top Bottom