Closing specific forms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NewtoAccess
    New Member
    • May 2007
    • 32

    Closing specific forms

    I have a dumb question for access 2002 regarding closing forms.

    In a FORM1 I have a LISTBOX1. When I click on listbox1 I want to open another FORM2 and then close FORM1-which contains listbox-.

    For some reason my DOcmd.Close command closes Form2 instead of Form1.

    Why? How can I specify which form to close?
  • BradHodge
    Recognized Expert New Member
    • Apr 2007
    • 166

    #2
    You could say...

    DoCmd.OpenForm "Form2"
    DoCmd.Close acForm, "Form1"

    That should work.

    Brad.

    Comment

    • NewtoAccess
      New Member
      • May 2007
      • 32

      #3
      I made changes and it worked, Thanks

      Comment

      • BradHodge
        Recognized Expert New Member
        • Apr 2007
        • 166

        #4
        Glad it's working.

        Brad.

        Comment

        Working...