Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002

    Unanswered: Closing a form using a Close button

    Here's what I'm trying to do:

    I have a main form with buttons that do a simple "Open Form" operation to open the desired form. What I would like to do in that process would be to write some sort of function or module that can close the form that was just clicked away from.

    Say, for example, FORM A is the "home form." On that, there are command buttons that link to other forms, FORM B and FORM C that perform separate operations. On forms B and C, there is a link back to the "home form," FORM A, and I would like to close FORM B or C upon going back to FORM A. I don't know if someone knows how to do this, but it seems logical in my mind. Any help anyone can offer would be greatly appreciated! Thanks much!


  2. #2
    Join Date
    Jun 2002

    Re: Closing a form using a Close button


    Some options here depending on what type of Forms you are using. Are they set as Dialog forms? Anyway this is pretty straightforward using a standard CLOSE button on Form B or Form C as you call them. You will need to make Form A not visible if you wish to view Form B and then make A visible again when B closes. Use vb like Forms!FormA.Visible = False on opening B and then set to Forms!FormA.Visible = True onclosing B.
    Alternatively set Form properties POP UP, MODAL to Yes and BORDER STYLE to Dialog and use standard CLOSE buttons.
    Hope this helps. Get back to me if you still are in difficulty. Nice week-end

Posting Permissions

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