Hey everyone,
I know this should be easy, but I'm just not getting what I want.
I have a table, a query, and a report. The query gets records based on To/From dates. The query pulls data that looks like this:
Date TOTAL SAVINGS Status 3/6/2013 $2,500.00 100 3/21/2013 $1,000.00 50 3/28/2013 $2,000.00 75
If status is 100, it's considered "closed" and if the status is less than 100, it's considered "open."
What I want is to have a report that will look like this:
Company Name
From Date: 1/1/13 (whatever is typed)
To Date: 3/31/13 (whatever is typed)
Open Status: 2 Savings: $3,000
Closed Status: 1 Savings: $2,500
______________________________________
Grand Total: 3 Savings: $5,500
I have the query working fine based on prompts for To/From dates, and the report shows the entered dates fine. Where I'm stuck is filtering based on "status" and totaling each.
I made groups for Open Header/Footer, and Closed Header/Footer, and I used a =Count(*) to get the counts for each group, then a =Count(*) for the total, but it's just not doing what I want. I don't want a line on the report for every record that is returned. I just want a total of everything returned, broken out by either "open" or "closed" and a total of records and savings for each group, then a grand total.
Is VBA code a better place to achieve this? I can't seem to make it do what I want in the query, using Iifs, and displaying properly on the report.
TIA,
Adam