Pop Up Form Focus Question

  • Thread starter Thread starter AccessIM
  • Start date Start date
A

AccessIM

I apologize if this appears numerous times but I have posted it twice and
still don't see it when I search for it.

I have a form with the pop-up and modal properties set to Yes. The form
contains a list box of names. When the user double-clicks on one of these
names, a report opens up using the name in the list box as criteria. This
all works great.

However, the pop-up form keeps the focus and remains on top of the report
making it hard to read. I would like for the focus to switch to the report
when the name is double-clicked so that the report is in front. Then when
the report is closed, the pop-up form regains the focus so they can either
select another name or close the pop-up.

Is this possible?
 
AccessIM,

You other post does appear, in fact it is showing up about 7 posts below
this one. There are responses to your OP. I have copied my comments from
two different replies:

Set your popup form to not visible when you open the report.
me.visible = false

Then in the On Close event of your report, set the popup form back to
visible.
forms!NamOfForm.Visible = true

another poster posted this comment:
You will need to set the pop-up to non-modal. You can't move focus off a
modal form.

Then I also posted this comment:
As I stated in my first post, in the code where you are opening the report,
just place the line of code:
Forms!NameOfYourForm.Visible = false

I will not matter that the form is set to Popup and Modal, the report will
then be visible and the form will not be in front of it.

Now, also in the On Close event of your report, you need the line:
Forms!NameOfYourForm.Visible = true

To again make the form visible. Using this, you can have the user provide
info in your form, open the report, close the report and then the user can
provide different info on the form and again open the report.

-----
HTH
Mr. B
http://www.askdoctoraccess.com/
Doctor Access Downloads Page:
http://www.askdoctoraccess.com/DownloadPage.htm
 
Back
Top