Results 1 to 5 of 5
  1. #1
    Ari C is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Location
    Northern California
    Posts
    3

    Unhappy Date Range Query for Valid Period

    I have a field that is a date and I need a criteria expression so that the query only returns dates that are no more than 1 year in the future.



    Here is the scenario:
    A release of information (ROI) is good for 1 year. The database has a field for the date the ROI was signed. We have been collecting data since 2012. When I run the query I would like to only have data that is inside that 1 year valid period. So if I run the report today (11/18/2014) I should only get back records that are between 11/18/2013 and 11/18/2014 inclusive.

    If you need more information please let me know.. I am having a bit of trouble figuring out how to explain this further.

    Thank you for your time and consideration

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Check out the DateAdd() function. Your example is the opposite of your description, but generally a criteria like:

    Between Date() and DateAdd(...)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Ari C is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Location
    Northern California
    Posts
    3
    Thanks for the quick response. I just re-read what I wrote and you are correct that my items are opposite. The scenario is what I need. I will try what you recommend.

  4. #4
    Ari C is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Location
    Northern California
    Posts
    3
    This worked... thank you so much

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Query for date range
    By BRZ-Ryan in forum Queries
    Replies: 23
    Last Post: 02-05-2014, 09:08 PM
  2. Graph date range from query
    By dhicks19 in forum Access
    Replies: 1
    Last Post: 06-29-2012, 12:26 AM
  3. Date Range Query
    By need_help12 in forum Queries
    Replies: 7
    Last Post: 04-25-2012, 01:38 PM
  4. Run query by date range
    By ARickert in forum Access
    Replies: 2
    Last Post: 06-23-2011, 10:54 AM
  5. Complicated Query needs some date range help
    By KevinMCB in forum Queries
    Replies: 1
    Last Post: 01-11-2011, 12:25 PM

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