Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Closing form on lost focus (2002)

    Hello All,
    I am trying to close a form automatically when the form looses focus. In the forms "on lost focus" event I have, - docmd.close acform "formname" -. However, it fails to close the form when I change focus to another form. Any idea why it will not close?

    Thanks,
    Mark

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Closing form on lost focus (2002)

    You should get an error message, for you cannot close the form during the On Lost Focus event.

    As an alternative, you could set the Modal property of the form to Yes. This means that the user must close the form before activating another form or report.

Posting Permissions

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