Haiden Turner
asked on
If subreport has no data, do not show text
I have a second page on an Access report that I do not want shown if there is no data in the subreport that makes up that second page. My subreport does not appear if it is empy so I'd like the text above it to also not appear. I'd really not even like a second page, if possible.
My subreport is tblContractAiringDatesSubr eport.
The text I"m trying to hide is Text165.
I cannot get the syntax to work:
Private Sub tblContractAiringDateSubre port_Enter ()
If Me.Report.HasData Then
Me.Text165.Visible = True
Else
Me.Text165.Visible = False
End If
End Sub
I'm not even sure if this is where I should be putting the If statement.
But also not sure the subreport is being reference correctly.
Thanks in advance for any help.
My subreport is tblContractAiringDatesSubr
The text I"m trying to hide is Text165.
I cannot get the syntax to work:
Private Sub tblContractAiringDateSubre
If Me.Report.HasData Then
Me.Text165.Visible = True
Else
Me.Text165.Visible = False
End If
End Sub
I'm not even sure if this is where I should be putting the If statement.
But also not sure the subreport is being reference correctly.
Thanks in advance for any help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
=IIf([tblContractAiringDat