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
 
Thanks John, it worked perfectly. I couldn't do it if wasn't you.

Thanks again
Marco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top