Calculations in a query

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

Guest

I have a query that gives me a monthly total and a ytd total.

I would like to know how to have both totals reset to zero in 2006 and give
me monthly and ytd totals for 2006 only and for the years to come.

Query as follows:
Query: PayeeTotals
PayeeName Group by
PayeeDate Group by
ChkNum Group by
ChkAmt Sum
WeeklyTotal: [CheckAmt] Sum
YTDTotal: Sum([checkamt]) Expression

-Thanks
D''''Angelia
 
I have a query that gives me a monthly total and a ytd total.

I would like to know how to have both totals reset to zero in 2006 and give
me monthly and ytd totals for 2006 only and for the years to come.

Query as follows:
Query: PayeeTotals
PayeeName Group by
PayeeDate Group by
ChkNum Group by
ChkAmt Sum
WeeklyTotal: [CheckAmt] Sum
YTDTotal: Sum([checkamt]) Expression

-Thanks
D''''Angelia

I presume you have a date field (though you don't indicate it)?

If so, include it in your query. Select the Where operator on the
totals row, and on the criteria line under it put
= DateSerial(Year(Date()), 1, 1)

John W. Vinson[MVP]
 

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