How to select a form which is already open

  • Thread starter Thread starter Irshad Alam
  • Start date Start date
I

Irshad Alam

I tried the below code to select the form (Form1), which
is aready open, but it does not function :

Private Sub Label113_Click()

DoCmd.OpenForm "Form2", acNormal
DoCmd.SelectObject acForm, "Form1", True

End Sub


Please note that I made the Label113 on Form1 to click on
that to open another Form (Form2) and get back the focus
to Form1

Could any one please correct my code or advise.
 
To set focus to a form that is already open:
Forms("Form1").SetFocus

That should work unless something is opened as dialog/popup/modal.
 
Back
Top