Results 1 to 4 of 4
  1. #1
    Canadiangal is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    81

    Query Can it be Done? Mulitple finds

    I am looking for a query that would look for all students who are taking two specific courses. I would like the query to only pull up those students who are taking both classes. However, I can not put in the course code field the criteria class1 and class2 because the student is listed twice, once taking class1 and then taking class2. If I put class1 or class2, then all students taking either appear. Solutions anyone?



    Thanks

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you tried using the DISTINCT key word? SELECT DISTINCT...

  3. #3
    Canadiangal is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    81
    While "Distinct" allows you to look at an entire column, it does not allow me to see if one student is taking two classes. Basically, I need to look at the student ID and see if the class id matches for both classes and then print in a report. In other words, the student ID must be the same for both class1 and class2.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It sounds like you have a query that returns the students that qualify to your criteria, but getb two records for each. Now create a query that runs against the first query and uses the DISTINCT key word.

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

Similar Threads

  1. Condense Mulitple Records
    By jquickuk in forum Queries
    Replies: 1
    Last Post: 08-10-2009, 08:43 AM
  2. Replies: 5
    Last Post: 08-06-2009, 11:47 PM
  3. Replies: 0
    Last Post: 02-26-2009, 03:34 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