B
Bert
Hi,
I've got this situation:
* frmOne, the masterform
* frmTwo, a subform of frmOne. The subformobject is 'subTwo'
* frmThree, a subform of frmTwo The subformobject (in frmTwo) is 'subThree'
All three forms are in single-view
Now from frmOne I can get a variable with the form-object of frmTwo. In
frmOne I use (i.e.) the code:
*****
Private Sub Form_Load()
Dim frm2 As Form
Set frm2 = Me!subTwo.Form
End Sub
*****
Now I need a reference to the Form-property of frmThree, as a sub-subform in
frmOne, such like:
*****
Private Sub Form_Load()
Dim frm2 As Form
Dim frm3 As Form
Set frm2 = Me!subTwo.Form
Set frm3 = frm2!subThree.Form
End Sub
*****
But the only thing I get is error 2455: invalid reference to form/report
property
I can access 'subThree', because 'frm2!subThree.SourceObject' returns the
name of the form that is in subThree. But I don't need the name, but the
Form-object.
Any idea?
Thank you,
Bert
I've got this situation:
* frmOne, the masterform
* frmTwo, a subform of frmOne. The subformobject is 'subTwo'
* frmThree, a subform of frmTwo The subformobject (in frmTwo) is 'subThree'
All three forms are in single-view
Now from frmOne I can get a variable with the form-object of frmTwo. In
frmOne I use (i.e.) the code:
*****
Private Sub Form_Load()
Dim frm2 As Form
Set frm2 = Me!subTwo.Form
End Sub
*****
Now I need a reference to the Form-property of frmThree, as a sub-subform in
frmOne, such like:
*****
Private Sub Form_Load()
Dim frm2 As Form
Dim frm3 As Form
Set frm2 = Me!subTwo.Form
Set frm3 = frm2!subThree.Form
End Sub
*****
But the only thing I get is error 2455: invalid reference to form/report
property
I can access 'subThree', because 'frm2!subThree.SourceObject' returns the
name of the form that is in subThree. But I don't need the name, but the
Form-object.
Any idea?
Thank you,
Bert