Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Suddenly Last Year! (Access 2003)

    Scenario:

    Data Records are created which contain a date field: Inv_DateCreated

    There is a need to compile data in two groups: This Year and Last Year

    What I'm looking for is a selection criteria that would simulate: Year and Year
    Cheers,
    Andy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Suddenly Last Year! (Access 2003)

    If you want to select records from a calendar year:
    - Create a query based on your table(s)
    - Add a calculated column:

    CalendarYear: Year([Inv_DateCreated])

    - To select records from this year, set the criteria for this column to Year(Date())
    - To select records from last year, set the criteria to Year(Date())-1

    If you want to select records by fiscal year, do the same, but create a calculated column

    FiscalYear: Year(DateAdd("m",3,[Inv_DateCreated]))

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Suddenly Last Year! (Access 2003)

    Hans,

    Amazing! Don't ever leave this Forum because a lot of pseudo-Access coders would be in deep trouble,

    Cheers,
    Cheers,
    Andy

Posting Permissions

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