Hiding footer when there is 1 line in detail

  • Thread starter Thread starter Maracay
  • Start date Start date
M

Maracay

Hi guys,

I have a report with a footer with some totals, it shows them all the time,
but what I want is not to show the totals if there is only one line in the
detail, because is the same information in the detail and the totals.

I will appreciate any idea of how to do this.

Thanks
 
How about adding the following to the forms Load event.

me.Section(2).visible = (me.recordsetclone.Recordcount > 1)

If you are going to be adding to the subform, you probably need to add the
same code to the forms AfterInsert event

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
My bad, I published this question in the wrong group, my question is about a
report not a form, I don't know if this solution apply also to a report.
 
Try the Reports OnFormat event.

You might also want to change the 2 (acFooter) to a 4 (acPageFooter)

me.Section(4).visible = (me.recordsetclone.Recordcount > 1)

Have not tried this, but it cannot hurt to give it a try.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
Back
Top