Skipping a sum'd record

  • Thread starter Thread starter Greg Casper
  • Start date Start date
G

Greg Casper

I have a report that prints checks for performers. It is based on a query
which contains ALL gigs for that performer, but I only want one check per
performer, which I have working fine... I just sum the detail records and
print ONE check with the summary amount using the itemfooter. Problem is, I
may already have paid the performer for gig's performed. So the question is,
how do I NOT print a record when the SUM of the amounts due the performer
turn out to be ZERO ?

Thanks

Greg
 
Use the OnFormat event for that section put

If Me.MySumControl'sName = 0 Then
Me.Control1.Visible = False
Me.control2.Visible = False

Else
Me.Control1.Visible = True
Me.control2.Visible = True

End If

Put in the real name of your controls.
Evi
 
Greg,

IMHO you are not going about this the best way. Your checks report
should be based on a Totals Query, which groups your data by
Performer, and Sums the amount due within the query, with a Criteria
in the query of >0 so that the only Performer records returned by the
query, and hence to the checks, are those who you owe money to.

Please post back with more details of the data if you need more
specific help with a Totals Query.

- Steve Schapel, Microsoft Access MVP
 
Back
Top