Results 1 to 6 of 6
  1. #1
    GizmoRN72 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    3

    Query to return membership NOT renewed for next year

    My alumni database tracks annual memberships, products purchased, donations, meeting attendance, etc. I want to query who paid for a 2019 membership but has not paid for a 2020 membership.

    Graduates Table:
    GraduateID (Primary Key, AutoNumber, Long Integer);

    Products Table:
    ProductID (Primary Key, AutoNumber, Long Integer);

    Orders Table:
    OrderID (Primary Key, AutoNumber, LongInteger), GraduateID (Number, Combo Box "SELECT DISTINCTROW Graduates.* FROM Graduates ORDER BY [Graduates].LastName, FirstName;

    Order Detail Table:


    OrderDetailID (Primary Key, AutoNumber, Long Integer, OrderID (Number), ProductID (Number, Combo Box "SELECT DISTINCTROW Products.* FROM Products ORDER BY [Products].ProductName

    See "Product" Attachment
    Product #57 is 2019 Membership
    Product #58 is 2020 Membership

    See "Relationship" Attachment

    Simple query using 57 as ProductID Criteria returns all 2019 Memberships
    Simple query using 58 as ProductID Criteria returns all 2020 Memberships
    I imported both reports into Excel. To view view sample, See Attachment "2019 & 2010 Membership".

    Using query Criteria of '57 And Not 58' only returns names of 2019 Memberships.

    Will appreciate any guidance
    Attached Thumbnails Attached Thumbnails Products.jpg   Query Relationships & Build.jpg   2019 & 2020 Membership Queries.jpg   Query Relationship.jpg  

  2. #2
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I'm kind of focused on this at present
    Using query Criteria of '57 And Not 58' only returns names of 2019 Memberships.
    If you want 57 and don't want 58, then why would you expect anything but 2019? Maybe I'm misunderstanding what you want, but it reads like "show me memberships for 2020" which is 58.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    GizmoRN72 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    3
    I want the query to return the graduates who have a 2019 Membership but not a 2020 Membership. For example, looking at the this example Click image for larger version. 

Name:	2019 & 2020 Membership Queries.jpg 
Views:	17 
Size:	87.4 KB 
ID:	40556,
    I want the query to return GraduateID 631 (Larry Anderson), GraduateID 182 (Martin Andries), and GraduateID 443 (Donna Berringer). They are on the 2019 Membership list but not the 2020 Membership list.

  4. #4
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Gotcha. Use the unmatched query wizard to find records that are in one domain but not another. You can use tables or queries as the domains. If all the records are in one table (as I suspect they should be) then use 2 saved queries - one to filter to 2019, the other to filter 2020. The wizard will walk you through the steps.
    You might have a problem with your data - 194 has 2 different first names on each side even though the last name is the same.

  5. #5
    GizmoRN72 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Posts
    3

    Perfect - Thank You

    Thank You! That is exactly what I wanted. Just saved me much time.

  6. #6
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Glad to have been able to help.

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

Similar Threads

  1. Contracts that were not renewed
    By avisam in forum Queries
    Replies: 2
    Last Post: 10-07-2019, 09:15 PM
  2. Replies: 2
    Last Post: 03-09-2018, 07:11 PM
  3. Return Records in Current Fiscal Year
    By BLFOSTER in forum Programming
    Replies: 5
    Last Post: 05-06-2016, 07:53 PM
  4. Replies: 6
    Last Post: 05-20-2013, 08:42 AM
  5. Access Query: Return Month Name and Year
    By PhatRam32 in forum Queries
    Replies: 7
    Last Post: 05-13-2013, 05:28 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