Only sum if have more then one detail

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi. I'm building a report and i've got a group and a footer for that group.
On that footer group I sum a column that appears in detais. Sometimes the
detais group only have one recordset. On those cases I don't want that the
group footer to appear.

regards,
Marco
 
Add a new control (txtLineCounter) to your detail section,
Control source: = 1
Running Sum: Over Group

Then in the On format event of the footer use code something like the
following

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer)
Cancel = (Me.txtLineCounter= 1)
End Sub
 
Back
Top