- Joined
- Jan 24, 2012
- Messages
- 1
- Reaction score
- 0
I am currently using Access 2007. I would like to be able to hide footers based on the number of grouped items in the footer’s group. Specifically, to avoid redundant sums, I want to hide the footer where there is only one grouped item in the group.
Thus far, I’ve been able to count grouped items. I do this by creating a text box in the group footer named txtGroupCountFC. I set its control source = 1 and running sum to Over Group.
Clicking on the footer bar, I’ve entered the code for On Format:
Private Sub GroupFooter4_Format(Cancel As Integer, FormatCount As Integer)
Dim flg As Boolean
If Me.txtGroupCountFC > 1 Then flg = True
Me.GroupFooter4.Visible = flg
End Sub
What happens is that all first grouped items’ footers are hidden rather than the footers where there is only one grouped item in the group.
Your help is much appreciated!
Bob
Thus far, I’ve been able to count grouped items. I do this by creating a text box in the group footer named txtGroupCountFC. I set its control source = 1 and running sum to Over Group.
Clicking on the footer bar, I’ve entered the code for On Format:
Private Sub GroupFooter4_Format(Cancel As Integer, FormatCount As Integer)
Dim flg As Boolean
If Me.txtGroupCountFC > 1 Then flg = True
Me.GroupFooter4.Visible = flg
End Sub
What happens is that all first grouped items’ footers are hidden rather than the footers where there is only one grouped item in the group.
Your help is much appreciated!
Bob