Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    Canton, Ohio, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Close Form Code (2000)

    I have a button on a form that when clicked closes the form using "DoCmd.Close". I would like it to also close another form at the same time, but I can't get the code right to do it. Can you show me the code to close one form from another form?

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

    Re: Close Form Code (2000)

    The Close method of DoCmd has extra arguments that you can use to close other objects than the "active" object. If you type a space after DoCmd.Close, IntelliSense will show you the options.

    DoCmd.Close acForm, "NameOfOtherForm"

  3. #3
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    Canton, Ohio, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Close Form Code (2000)

    That did it, thank you very much.

Posting Permissions

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