I have two forms Form1 and Form2. From Form1 using a button Form2 is opened. Then afterwards via a button I close Form2. After closing, I see the desktop rather than Form1.
How do I use DoCmd.close so that I return back to Form1?
Also after spending some time testing different forms, i came to know that this problem only occurs when the form i am using is a Split-Form. Forms that i have designed myself return back to the previously active form on DoCmd.Close.
Form1
Code for Button
Private Sub Command7_Click()
DoCmd.OpenForm "Form2", , , , , acDialog
End Sub
Private Sub Form_Load()
DoCmd.Maximize
End Sub
Form2
Code for Button
Private Sub Command13_Click()
DoCmd.Close
End Sub