none
Access Query threshold and date range RRS feed

  • Question

  • I build basic queries to pull data for work projects.  I don't have a lot of experience or knowledge with access.  I normally watch videos and learn how to build queries.  I am trying to figure out how to build a query that will return results based on specific thresholds or a criteria.  Let's say I had a business and wanted to look at a specific date range say 60 days and determine if a customer purchased more than three items within the 60 day time period.  Using the current date and going back 60 days.  The report would display results of the name field had the same name appear three times within the 60 day time frame.  How would I create a query statement for those fields?    
    Tuesday, April 4, 2017 3:02 AM

All replies

  • Add these in a 'Totals' query and turn off the SHOW --

    YourDateField and use criteria  Between Date() AND Date()-60 

    YourNameField set to COUNT and use criteria >= 3


    Build a little, test a little

    Tuesday, April 4, 2017 4:08 AM
  • For more examples about Date Criteria in query, please visit Examples of using dates as criteria in Access queries

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 4, 2017 6:54 AM
    Moderator