davecocks
asked on
Making a sub-subform visible / invisible
Hi,
Form: groupSurvey
subform survey
sub-subform: subform_landSightings
I'm trying to make a sub sub-form visible / invisible from a button click on the main form.
subform_landSightings is a subform of survey.
The code below gives this ERROR:
Run time error 2455
You entered an expression that has an invalid reference to the property Form/Report
Thanks.
Form: groupSurvey
subform survey
sub-subform: subform_landSightings
I'm trying to make a sub sub-form visible / invisible from a button click on the main form.
subform_landSightings is a subform of survey.
The code below gives this ERROR:
Run time error 2455
You entered an expression that has an invalid reference to the property Form/Report
Thanks.
If Forms!surveyGroup.survey.Form.surveyTypeID.Value = 2 Then
MsgBox "is Land"
Me!survey.Form!subform_LandSightings.Form.Visible = True
Else
Me!survey.Form!subform_LandSightings.Form.Visible = False
End IF
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You were close. The last 'Form' reference is not required. That's only needed if you were referring to a control on the sub-sub form.
See this link for the ultimate reference in form/subform ... report/subreport systax
http://www.mvps.org/access/forms/frm0031.htm
mx
See this link for the ultimate reference in form/subform ... report/subreport systax
http://www.mvps.org/access/forms/frm0031.htm
mx
ASKER