Results 1 to 4 of 4
  1. #1
    bezoomnyveshch is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    5

    Query to select records that do not match within a date range

    Hi everyone,



    This is probably a noob problem but I can't figure it out for the life of me.

    I have a customer table with a related purchase table. What I would like to do is to set a date range and find all customers who HAVE NOT made a purchase within that range.

    The issue I'm running into is if set up the query to return records between a start and an end date, only those who HAVE made a purchase appear. I can use the "is null" parameter, but that will only give me customers who have never made a purchase.

    Does anyone have insight into the best approach for this?

    Thanks!

  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,521
    Use your query of who HAS made a purchase during the time frame, then use the unmatched query wizard to compare that query against the table of all customers. That will give you who has NOT made a purchase in the time frame.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    bezoomnyveshch is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    5
    That seems like a simple solution, thank you! I'll update once I give it a try.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem, post back if you get stuck.
    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. Replies: 4
    Last Post: 07-18-2013, 03:14 AM
  2. Replies: 1
    Last Post: 05-09-2013, 09:13 AM
  3. Select Date Range
    By dr4ke in forum Queries
    Replies: 8
    Last Post: 06-25-2012, 07:04 AM
  4. SELECT a specific DATE RANGE in Query
    By taimysho0 in forum Queries
    Replies: 28
    Last Post: 06-04-2012, 04:58 PM
  5. SELECT only this DATE RANGE (Pic Attached)
    By taimysho0 in forum Programming
    Replies: 1
    Last Post: 05-30-2012, 01:18 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