Yes - you completely confused me.
I had to create a copy of your example database to understand what on earth you were talking about - it would have been easier if you had uploaded yours.
I minimized the main form so I could see the other form(s)!
I'm still not clear what the purpose is of determining the value x as you don't use it.
However you do need to close the instance that you have opened (invisibly)
To only end up with one copy of form F1 open, change the main form code to:
Code:
Private Sub Form_Load()Dim x As Integer
DoCmd.Minimize
First = True
x = Form_F1.WindowHeight
DoCmd.Close acForm, "F1"
First = False
DoCmd.OpenForm "F1"
End Sub
OR to this ....
Code:
Private Sub Form_Load()Dim x As Integer
DoCmd.Minimize
First = True
DoCmd.OpenForm "F1", , , , , acHidden
x = Forms!F1.WindowHeight
DoCmd.Close acForm, "F1"
First = False
DoCmd.OpenForm "F1"
End Sub
Next time you have a problem with forms, can you please explain the context more clearly and upload an example database. Thanks