M
Maarkr
I have a main form, with a subform that is only visible when the appropriate
cmdbtn is clicked, which loads the associated form. Works well:
Private Sub CommandCSC_Click()
Child45.SourceObject = "CSCfrm"
Child45.Visible = True
End Sub
One of these forms uses the web activeX control, loading a web page. This
works well, but it sometimes takes up to 15 seconds to load the web page. So
I decided to load that form up as not visible when the main form is started,
then make it visible when the associated cmdbtn is clicked, so it comes up
instantly.
Problem is, I can make the form visible, but I can't figure how to make it
visible inside the subform. It becomes visible and now has the focus instead
of the main form:
Private Sub CommandWX_Click()
If CurrentProject.AllForms("WXfrm").IsLoaded = True Then 'check to see
if it is loaded
Forms!WXfrm.Visible = True 'this loads it as the primary form
Child45.SourceObject = "WXfrm" 'I thought this may make the
form the subform but it doesn't
End If
Child45.Visible = True
End Sub
To recap... how to have the form become visible as the child45 source object.
cmdbtn is clicked, which loads the associated form. Works well:
Private Sub CommandCSC_Click()
Child45.SourceObject = "CSCfrm"
Child45.Visible = True
End Sub
One of these forms uses the web activeX control, loading a web page. This
works well, but it sometimes takes up to 15 seconds to load the web page. So
I decided to load that form up as not visible when the main form is started,
then make it visible when the associated cmdbtn is clicked, so it comes up
instantly.
Problem is, I can make the form visible, but I can't figure how to make it
visible inside the subform. It becomes visible and now has the focus instead
of the main form:
Private Sub CommandWX_Click()
If CurrentProject.AllForms("WXfrm").IsLoaded = True Then 'check to see
if it is loaded
Forms!WXfrm.Visible = True 'this loads it as the primary form
Child45.SourceObject = "WXfrm" 'I thought this may make the
form the subform but it doesn't
End If
Child45.Visible = True
End Sub
To recap... how to have the form become visible as the child45 source object.