Results 1 to 2 of 2
  1. #1
    lugnutmonkey is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    42

    Year to DATE by Month

    I am trying to set up a query that looks back 24 months from the current and/or selected month and measures the % change. this query would in effect give me a month over month comparison going back one full year. I have tried using a select query where the months are in between Month(Date)) and Month(Date))-24. Thisquery only reurns the current month going back 24 months.



    So that if the current month is january 2013 it will only select january 2013, januray2012 and january 2011. I would like it to select all months between the latest and earliest date.

    If you have any questions or would like to see the code that i am using just let me know an I will happily post it.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Try:

    BETWEEN Format(Date,"mmyyyy") AND Format(DateAdd("m",-24,Date),"mmyyyy")
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. how to extract month and year from date column
    By penguinwebsoft in forum Queries
    Replies: 5
    Last Post: 10-11-2012, 11:29 PM
  2. Replies: 4
    Last Post: 09-17-2012, 02:15 PM
  3. month year date
    By slimjen in forum Database Design
    Replies: 6
    Last Post: 04-17-2012, 01:02 PM
  4. Separating a date into day, month and year
    By teirrah1995 in forum Reports
    Replies: 3
    Last Post: 07-17-2011, 02:17 PM
  5. Current Month and Year-To-Date
    By DSnipeFunk in forum Access
    Replies: 4
    Last Post: 05-31-2011, 11:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums