
Originally Posted by
RayMilhon
This is what I put in but I get the error Message Method or data member not found
What am I missing? I typed hasdata Access changed it to HasData but I still get the error message????
Me.Previous_Admits_Label.Visible = Me.Previous_Admits.HasData
Me.Cases_Label.Visible = Me.Cases.HasData
Nope, you aren't using it correctly. Remember you need to refer to the subreport CONTROL (control on the parent report which HOUSES the subreport and is not the subreport itself unless they are named exactly the same). And you need to add the .Report. part.
So - if your subreport control name is actually Previous_Admits and not Previous_Admits subreport (same with cases), it would be:
Code:
Me.Previous_Admits_Label.Visible = Me.Previous_Admits.Report.HasData
Me.Cases_Label.Visible = Me.Cases.Report.HasData
But if it is the other then:
Code:
Me.Previous_Admits_Label.Visible = Me.[Previous_Admits subreport].Report.HasData
Me.Cases_Label.Visible = Me.[Cases subreport].Report.HasData