I am attempting to hide the detail section of a report conditionally.
I want to hide all rows where the field trn_DaysModified is less than or equal to the field rty_TargetDays (hide all records in target)
My research suggest the following should work, but my report is still showing all rows (rows are also grouped by trn_DaysModified so i can count the number of records by trn_DaysModified)
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Me.trn_DaysModified <= Me.rty_TargetDays Then
Me.Detail.Visible = False
Else
Me.Detail.Visible = True
End If
End Sub
Can someone please point out where I am going wrong?