I am trying to hide a subform after it has lost focus. If I use the On LostFocus event to try and hide the form I get an error becuase the subform still has the focus even though something outside of the subform was clicked and the LostFocus event function has been executed.
It appears to me that the LostFocus event occurs when the Focus has not yet moved. How can I tell when the focus has indeed moved off of the subform without using GotFocus event (too many other controls and subforms that can be clicked to monitor for this)?
Open to correction on this, but I think each form/subform has it's own focus, so the form you're moving away from never truly loses it's own focus.
So, rather than using OnLostFocus of the form you've left, use an event on the form/subform you've moved to, to hide the first. Something like the OnClick of a button on your new subform.
Hope this makes sense...