Count function in a report

G

Guest

I have a table called Sales. It contains the name of the salesperson(CSR), a
yes/no field for the item (DC), and a date field for when they sold the item
(SaleDate). I am trying to run a report to get the total sales within a date
range. All I want to see is the CSR and total for DC = yes.

I have tried numerous ways and numerous code and nothing seems to work. I
know what ever it is I'm not doing is simple, I just can't seem to figure out
what it is. Can someone help me? I've even looked through the posts in here
and it doesn't work.

Thanx!
 
D

Duane Hookom

To get the total of a field [SaleTotal] where the SaleDate is between
4/1/2005 and 6/30/2005, you would use a control source like:
=Sum( Abs([SaleDate] Between #4/1/2005# and #6/30/2005#) * [SaleTotal])

If you want to add a criteria of DC=Yes then use:
=Sum( Abs([SaleDate] Between #4/1/2005# and #6/30/2005# AND [DC]=True) *
[SaleTotal])
 

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