Opening querys in new window

I

Ian AFFS

Hi,
I have a main form which fills the screen, with no toolbars etc. I have a
button which opens up another form which contains controls boxes which brings
up the different queries. However these queries open up behind the main form.
I don't wnt my users to ever leave the main form or minimize it.
How can I make the queries come up in front of the main form, so that when
they are closed the main form is revealed again?

Many Thanks in advance
Ian
 
R

Roger Carlson

Check the properties of the form. Look specifically at the PopUp and Modal
properties. PopUp keeps the form on top of everything else and Modal won't
let you leave the focus leave this form. Try setting them to NO. Also if
you are opening this form with the DoCmd.OpenForm techique, make sure the
Mode parameter is not acDialog. Of course, these setting changes will
affect how the form works under other circumstances as well, so you should
test it to make sure the app still works the way you want. (By this I don't
mean the form itself will work differently -- I mean the form will interact
with the application as a whole differently.)
 
B

Brendan Reynolds

When you open a query in the UI, you abandon control of the application.
Queries do not expose any events to which you can hook VBA code, so you are
no longer in control of what happens. If you want to maintain control, you
need to use forms bound to those queries instead of displaying queries
directly.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Top