Specific Dates vs. YTD

  • Thread starter Thread starter AccessQuestions via AccessMonster.com
  • Start date Start date
A

AccessQuestions via AccessMonster.com

I need to create a query that will display values for a specific date range
and compare them to the year to date . How can I have a query list items
based on a date range and compare them to the year to date value. End result
I will display this in a report, but can't get it to work in the query to get
it in a report.
 
Presumably you already have the query with the date range working?
It's probably a Totals query with criteria under the date field.

The YTD value will probably be a subquery. A basic example would be
something like this typed into the Field row of your query:
YTD: (SELECT Sum([Amount]) FROM tblSales AS Dupe
WHERE Dupe.SaleDate Between DateSerial(Year(tblSales.SaleDate),1,1) And
Date()))

If subqueries are new, see:
How to Create and Use Subqueries
at:
http://support.microsoft.com/?id=209066
 
Back
Top