Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    May 2004
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Closing Forms (Access 2000)

    Hello,
    I would like to know if there is a way (which I am sure there is) to close a form when it loses focus. For example if I have a form open and then I open another form I would like the form I opened first to close automatically. Is this something that can be achieved. Any feedback would be very much appreciated.

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

    Re: Closing Forms (Access 2000)

    No, that is not possible - trying to close the form when it loses focus leads to conflicts. If you open the second form from a command button on the first one, you can add code to the On Click event of the command button to close the first form. Or you can use code in the On Open or On Load event of the second form to check if the first one is open, and if so, close it.

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Closing Forms (Access 2000)

    I suppose you open your second form by a button on the first one.
    In the on click event add a line :

    DoCmd.Close acForm, Me.Name

    after the Docmd.OpenForm ...
    Francois

  4. #4
    Star Lounger
    Join Date
    May 2004
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Closing Forms (Access 2000)

    Thank you Francois. I appreciate you responding. I believe I can now solve the issue.

  5. #5
    Star Lounger
    Join Date
    May 2004
    Posts
    81
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Closing Forms (Access 2000)

    Thank you Hans. Your feed back is always appreciated. I believe this info will help

Posting Permissions

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