Good morning!
I thought I posted this yesterday, but I can't find it anywhere. Apologies for duplication. I need to hide a subreport when the balance is zero. I know I can hide it when there is no data, but that is not the case. I have tried:
Code:
Private Sub Report_Current()
If Reports!groupassessmentstatement.Report![GeneralAccountDetailSubReport]![LegalFees].Report![BalanceDue] <> 0 Then
Debug.Print "the balance due is" & BalanceDue
Reports!groupassessmentstatement.Report![GeneralAccountDetailSubReport]![LegalFees].Report.Visible = True
ElseIf Reports!groupassessmentstatement.Report![GeneralAccountDetailSubReport]![LegalFees].Report![BalanceDue] = 0 Then
Debug.Print "the balance due is zero"
Reports!groupassessmentstatement.Report![GeneralAccountDetailSubReport]![LegalFees].Report.Visible = False
End If
End Sub
Private Sub Report_Load()
If Reports!groupassessmentstatement.Report![GeneralAccountDetailSubReport]![LegalFees].Report![BalanceDue] <> 0 Then
Reports!groupassessmentstatement.Report![GeneralAccountDetailSubReport]![LegalFees].Report.Visible = True
ElseIf Reports!groupassessmentstatement.Report![GeneralAccountDetailSubReport]![LegalFees].Report![BalanceDue] = 0 Then
Reports!groupassessmentstatement.Report![GeneralAccountDetailSubReport]![LegalFees].Report.Visible = False
End If
End Sub
with no luck. Thoughts? TIA!! ~PEACE~