I want to open mainform before the subeform (why?)
My form need 6 seconds to load and show the form and subform to the user .I read that when at first the mainform is loaded and then the subform and tits Data are loaded ,the opening time could be better(less than 6 seconds) hence I tried to implement this scenario:
I dleted the value of Sourceobject in the my subform property and add this block of code in mainform:
Private Sub Form_Timer()
Me.TimerInterval = 0
Me!ufrm_bauteile.SourceObject = "ufrm_bauteile"
End Sub
I set the Timerinterval in my mainform Property to 1.Logicaly I think it should work fine but an error Occure (error number 2467):
The Expression you entered refers to an object that is closed or doesn’t exist
How can solve this Problem?
When you first open a form, the following events occur in this order:
I would advice you not to set the timer, but to load the subform in your Load event handler.