MS Access - Close pop-up form when clicking main form

HomerTNachoCheese
HomerTNachoCheese used Ask the Experts™
on
I have two forms in a MS Access 2007 database:

frmDataEntry, frmAdjustmentsPopup

frmDataEntry has an event that causes frmAdjustmentsPopup to open.

Rather than have the user click frmAdjustmentsPopup's close button, I would like frmAdjustmentsPopup to close when the user clicks anywhere within frmDataEntry.

I realize this may seem trivial, but this would greatly improve data entry speed.

frmDataEntry is set as continuous forms.
frmAdjustmentsPopup opens with Popup = Yes, Modal = No.

It has to remain Popup = Yes as frmDataEntry runs maximized and has to stay that way, and frmAdjustmentsPopup should not be maximized when opened.  

frmAdjustmentsPopup's On Lost Focus and On Deactivate events do not capture the event of clicking on frmDataEntry.

frmDataEntry's Form_Activate, Form_GotFocus, Form_MouseDown events do not capture the event of leaving the popup form and going back to frmDataEntry.

Edit:
One thing I just read is this:
The Activate event doesn't occur when a form receives focus back from a dialog box, popup, or another form.

So, I need a workaround for this, as I have to run this as a popup.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Owner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010
Commented:
Have you tried the Current event of frmDataEntry?

It will fire whenever a record on that form receives the focus by clicking on the record selector or in any of the appropriate fields of the record

Author

Commented:
It may work, seems more simple than another workaround I was about to attempt.  Trying it in a few...

Author

Commented:
Works perfectly!  That was easy and runs efficiently.

Author

Commented:
There is a lot of code that fires all over the place in this program, as it is a complex home-grown payroll data entry and attendance tracking program.  This method runs with zero delays, and is the perfect solution.  

Thanks for the help!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial