Conditional Sum based on Date Range

T

turniipp

I am attempting to have a total at the end of a report that only totals those
records whose date falls within a certain month.

For example....I have paidtill record that reports when a certain customer
has paid through. The purpose of the report is to show all of my inventory
and who is currently in possesion of it, and when they have paid through.
Currently the report does show all of the inventory, and pulls up the last
customer to have made a rental payment and the date that the payment paid
through. So one report may show multiple different paid through dates.

I am attempting to create a total at the end of the report that will total
the rental payments of only those who have made a payment in a given month. A

Any help would be appreciated.
 
C

Clifford Bass

Hi,

It is not quite clear to me what exactly is in your report. Be that as
it may; supposing you want to report those who paid in the current month.
Create an unbound control in the report footer. Set its Control Source to
something like this:

=Sum(IIf(Month([PaidTill]) = Month(Date()) and Year(PaidTill) =
Year(Date()), [PaymentAmount], 0))

If that does not help, post back with specifics such as control (field)
names and some example report data, along with the expected results.

Hope that helps,

Clifford Bass
 

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

Top