Results 1 to 6 of 6
  1. #1
    cshipley83 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    28

    Query for report to pull entered dated and previous 3 months

    Hi. I need help with a Query. When I click to open a report I need a parameter to ask for a date to be entered and then it would pull anything for that date plus the previous three months. Thanks.

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Is there ever any future dates in your data?
    If not, you should be able to just use this in your Criteria:
    Code:
    >=DateAdd("m",-3,[Enter Date])

  3. #3
    cshipley83 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    28
    This is giving me future dates and previous dates too far back.
    For example: I enter date 07/31/16, it's giving me from 04/30/16 through 08/10/16

    I want it to give me all of 05/01/16 through 07/31/16

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Yep, that is why I asked if you had any future dates, in hopes to use a simplified formula.
    Just a little more complex, try this:
    Code:
    Between (DateAdd("m",-3,[Enter Date])+1) And [Enter Date]

  5. #5
    cshipley83 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Aug 2016
    Posts
    28
    Awesome, this works great. Thank you so much.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    ... Misread question so deleted

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

Similar Threads

  1. Replies: 3
    Last Post: 05-10-2016, 11:51 AM
  2. Replies: 8
    Last Post: 10-23-2013, 04:37 PM
  3. Calculate Sales of Previous Months
    By v!ctor in forum Queries
    Replies: 1
    Last Post: 09-07-2013, 01:36 PM
  4. Replies: 2
    Last Post: 08-25-2010, 01:42 PM
  5. Total all months in query or report
    By Brian62 in forum Queries
    Replies: 2
    Last Post: 10-23-2009, 08:41 AM

Tags for this Thread

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