Results 1 to 5 of 5
  1. #1
    AdamN is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2012
    Posts
    5

    Question Course Management - If Members have completed courses they are listed

    Good Day!



    I am having trouble determining how to solve a problem with Access 2003.

    I have a database that we have been tracking if a user has completed a course. We now want to use this data to determine if they are eligble for a promotion.

    Example:

    Member Course
    User 1 course 1
    User 2 course 1
    User 1 course 2
    User 3 course 3


    What I want to determine is if a user hase completed specific courses that makes them eligibe to be promoted that the query outputs the list of members that are qualified for the promotion.

    In the above example, having completed "course 1" and "course 2" would make a user eligible for promotion. In this case, User 1 is the only member that has met both criteria and would be the only user output by the query.

    For the life of me I cannot determine how to do this. Any suggestions would be greatly appreciated.

    Cheers,

    Adam

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Assuming a table name of "tblCourseMgmt", this query should return all people eligible for a promotion based on your sample and criteria:
    Code:
    SELECT tblCourseMgmt.Member, Sum(IIf([tblCourseMgmt]![Course]="course 1",1,IIf([tblCourseMgmt]![Course]="course 2",10,0))) AS [Counter]
    FROM tblCourseMgmt
    GROUP BY tblCourseMgmt.Member
    HAVING Sum(IIf([tblCourseMgmt]![Course]="course 1",1,IIf([tblCourseMgmt]![Course]="course 2",10,0)))=11;
    See if you can see the logic I incorporated. If you do not understand what I did, let me know and I'll explain it.

  3. #3
    AdamN is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2012
    Posts
    5
    Wow, you just blew my mind. This process makes so much sense to me. You are assigning each course a value, and when all the courses have been taken, they sum to a specific value which you are checking for.

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You got it!!!

  5. #5
    AdamN is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2012
    Posts
    5
    Thank you so much!

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

Similar Threads

  1. Counting Results: Passed/Failed!
    By cap.zadi in forum Queries
    Replies: 4
    Last Post: 12-05-2011, 12:20 PM
  2. automatically update club members age group
    By sirnickettynox in forum Programming
    Replies: 4
    Last Post: 04-06-2011, 06:52 AM
  3. Basic DB to record Students Courses PLEASE HELP
    By littleliz in forum Database Design
    Replies: 5
    Last Post: 09-14-2010, 02:58 PM
  4. courses query
    By lolo in forum Queries
    Replies: 0
    Last Post: 04-23-2010, 01:00 PM
  5. Form Data Not being passed onto query
    By fmoses in forum Queries
    Replies: 2
    Last Post: 08-20-2009, 08:33 AM

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