Results 1 to 3 of 3

Thread: Focus

  1. #1
    Join Date
    Jul 2004
    Posts
    5

    Unanswered: Focus

    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)?

    Thanks
    Eric

  2. #2
    Join Date
    Nov 2003
    Posts
    66
    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...

  3. #3
    Join Date
    Jul 2004
    Posts
    5
    Sounds simple enough except that there are many other forms/subforms the user can click, it would be too difficult try and predict all the areas the user might move too.

    Any other suggestions?

    Eric

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •