Hiding Group Footer based on condition
Macker wrote:
Can anyone tell me how to hide Group Footer based on a condition? Below is an
example of output. I want to display subtotal only if number of projects are
more than 2. Company B has only 2 projects and no sub total should be
displayed.
Company A
Project1 Cost $1000
Project2 Cost $1000
Project3 Cost $1000
Sub Total $3000
Company B
Project1 Cost $1000
Project2 Cost $1000
Company C
Project1 Cost $1000
Project2 Cost $1000
Project3 Cost $1000
Project4 Cost $1000
Sub Total $4000
Add a tet box (named txtNumProjects) to the group header or
footer section and set its expression to =Count(*)
Then add a line of VBA code to the footer section's Format
event procedu
Cancel = (Me.txtNumProjects = 2)
--
Marsh
MVP [MS Access]
|