Maiking one form visible from another

J

John Baker

I would like to be able to have a command button on a form which will go to
and maximise another form which is already open. I would like this form to
be maximised and the one with the button to be minimized.

I have tried hiding the first form by using "me.visible = false" The
problem with this is it is then not available in the task bar at the bottom
of the screen.

Any help greatly appreciated.
John B
 
A

Allen Browne

Unless you are opening forms in dialog mode, you can just SetFocus to the
other form so that it jumps to the front, e.g.:
Forms!Form1.SetFocus
 
R

Rob Parker

Hi John,

You can use a form's Gotfocus or Activate events to run a command to
maximize the form, and the LostFocus or Deactivate events to minimize the
form. The code itself is simply:
DoCmd.Maximize
or
DoCmd.Minimize
Or, to restore to a standard window (neither maximized nor minimized):
DoCmd.Restore

A combination of these in the events of both forms should give you want you
want.

HTH,

Rob

PS. Sent this yesterday, but accidentally hit Reply, rather than Reply
Group, so it didn't appear in the newsgroup.
 

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