2 Replies Latest reply: Jun 20, 2013 6:19 PM by Ali Gracie RSS

    Is there a way to exclude items selected from a listbox?

      Listboxes are used to select data. Is there a way to do the opposite: to exclude anything selected from a listbox?


      Let's say there's a table containing student IDs and names.



      ID   Name

      1    John

      2    Beth

      3    Zack


      There's another table that links each student to the classes they're taking.



      Student ID   Course ID

      1                 Math101

      1                 Eng101

      1                 Art232

      2                 Math101

      3                 Chem101

      3                 Science283

      3                 Math101




      Based on this example, John is taking three classes, Beth is taking one and Zack is taking three.


      I wish to have listbox#1 for CourseID which would just show all the courses being taken by students.

      The problem is I wish to have listbox#2 showing courseID, but exclude anything selected from listbox#2 from the current selection.


      That means if I select Math 101 from listbox #1, my selection should include all 3 students.
      But if I select Art232 and Chem101 from listbox#2, I want my current selection to exclude John and Zack.


      This would help in finding this: "Show me students that are currently taking Math 101, who are not taking either one of Art232 or Chem 101."

      I want the user to be able to first choose Math101, and also have the option to choose Art232 and Chem101 from a separate listbox so they can get excluded.


      Is there a way to do this?

      Perhaps even by using some expressions in charts so that it'll exclude students who are taking courses selected from the 'exclude' list?

      Maybe by set analysis?


      I find the challenge in the multi-link relationship between student and courses.