Conditionally hide detail and footer

I have a report is grouped by employee number. In the group footer I have a sum of total hours. I would like the detail and footer to be hidden if the total hours are under 100. How do I code this.
Serena2345Asked:
Who is Participating?
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
How are you determining Total Hours? If this is a calculated field (i.e. you're doing this in the Report, perhaps with a Running Sum) then you may not get the results you're looking for.

You can try doing this in both the Detail and Footer's Format event;

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  Me.Detail.Visible = Me.TotalHours<100
End Sub


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.