Results 1 to 5 of 5
  1. #1
    Flairo is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2017
    Location
    Clovis, NM
    Posts
    2

    Filter out Students that have passed any class

    I have a table with this example information:
    Student Grade
    John A
    John C
    John A
    Lucy F
    Lucy B
    Lucy B
    Adam F
    Adam F
    Adam F

    I am trying to make a query that produces this:
    Student Grade
    Adam F
    Adam F
    Adam F



    If the student has passed any of their classes, I want to take them out of the list.
    John passed all classes, out of the list. Lucy passed at least one class, out of the list. Adam failed all classes, keep in the list.

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Create a group query to return names of people who only have f

    Then query this query with original tblresults.


    Sent from my iPhone using Tapatalk

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Maybe
    Code:
    SELECT Table1.Student, Table1.Grade
    FROM Table1
    GROUP BY Table1.Student, Table1.Grade
    HAVING (((Table1.Grade)="F") AND ((Count(Table1.grade))=3));
    Obviously, change "Table1" to your table name.......

  4. #4
    Flairo is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2017
    Location
    Clovis, NM
    Posts
    2
    Thank You! ssanfu, works great.

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Great....... I'll mark this solved???

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

Similar Threads

  1. Replies: 1
    Last Post: 11-23-2016, 07:42 PM
  2. Replies: 2
    Last Post: 07-25-2016, 08:12 AM
  3. Replies: 1
    Last Post: 10-29-2015, 08:36 AM
  4. Filter not being passed
    By GraeagleBill in forum Reports
    Replies: 3
    Last Post: 11-16-2013, 07:35 PM
  5. How do I use a passed parameter in a Case statement
    By tarenja in forum Programming
    Replies: 7
    Last Post: 08-04-2013, 10:49 PM

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