eliwil
asked on
reference to Subform's subform RecordsetClone
I'm trying to reference a subform's subform RecordsetClone and getting the error: Can't find the field 'fsubGrtCycle' referred to in your expression. Here's what I'm using. Can you see where I'm going wrong?
If Forms!frmMainInd!fsubGrtOr g.Form!fsu bGrtCycle. Form.Recor dsetClone. RecordCoun t > 0 Then
.........
E
If Forms!frmMainInd!fsubGrtOr
.........
E
try:
If Forms!frmMainInd!fsubGrtOr g.Controls ("fsubGrtC ycle").For m.Recordse tClone.Rec ordCount > 0 Then
--bluelizard
If Forms!frmMainInd!fsubGrtOr
--bluelizard
For info:
www.mvps.org/access/forms/frm0031.htm
www.mvps.org/access/forms/frm0031.htm
ASKER
Peter,
fsubGrtCycle is the name of both the form and the subform control.
Bluelizard,
Tried your reference and got the same "can't find the field..." error as before.
E
fsubGrtCycle is the name of both the form and the subform control.
Bluelizard,
Tried your reference and got the same "can't find the field..." error as before.
E
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Where do you put this code? Maybe the subform hasn't been loaded yet. In that case no recordset exists.
/gustav
/gustav
ASKER
Pete,
I had missed a layer. It was actually nested not one layer down on a subform but two.
E
I had missed a layer. It was actually nested not one layer down on a subform but two.
E
Make sure that fsubGrtCycle is the name of your sub-subform CONTROL on the subform. The control usually has the same name as the form it contains but it is not necessarily so.
Pete