Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Sydney, New South Wales, Australia
    Thanked 0 Times in 0 Posts

    YTD Data for Previous Years (Access 2003 SP3)

    I am trying to get a query criteria that will show year to date data for the same period over all previous years. The table needing analysis is a list of incidents and of course the user needs to compare YTD data with all previous years for the same period. For example, if the end date is 31st March 2008 then the query needs to show incidents within the first three months from all years starting 1st January up to end March of every year, and of course, nothing from April to December of any year.

    I've tried this but it gives me every month of all prior years and is therefore not ending at March of every year:

    Between DateSerial(Year(FormDateField)-99,1,1) And DateSerial(Year(FormDateField),Month(FormDateField ),Day(FormDateField))


  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: YTD Data for Previous Years (Access 2003 SP3)

    Create a new, calculated column:

    M: Month([FormDateField])

    Clear the Show check box for this column.
    For YTD data up to the end of March, set the criteria for this column to <4 (or to <=3).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts