how to query on a subtotal in Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to query subtotals in Access 2003? Records in my table
contain an amount field and a date field. Amounts can be positive or
negative. A report based on this table is grouped by the date field and then
a sum formula displays subtotals by date. I want to exclude all records for
any date where the subtotal for that date is zero. How can I build a query
to do this? Or, can I do without a query?

Thanks.
 
John,

The SQL view of such a query would look like this...
SELECT YourDate, Sum(Amount) As SubTotal
FROM YourTable
GROUP BY YourDate
HAVING Sum(Amount)<>0
 

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

Back
Top