Hi All,
How can multiple instances of one continuous subform (10 copies; no tab control) be made to behave like one multi-select listbox, populating a join table? I'd like to use something like Albert Kallal’s MultiSelect.mdb from http://www.kallal.ca/msaccess/msaccess.html, but am unsure how to use it as an unbound, list-box-style subform.
Desired functionality:
I’d like for the frmMAIN to simply show the client’s name. The 10 subforms would group all classes by their category, and show the different classes available for the client to select. The user would click various checkboxes next to the classes' names in the subforms, and then click a submit button. This would then create all the records in the join table.
Any help in developing this would be very much appreciated.
Thanks!
Other info:
Tables:
tblClients, tblClasses, tblClassCategories, tblClassSubcategories, jtblClientsAndClasses
Form Setup:
Currently, the parent form is named frmMAIN and the 10 instances of the same subform are: sfrmClasses1, sfrmClasses2, …, sfrmClasses10. To filter, I’ve put 10 hidden textboxes on the parent form that correspond with each subform: txtClasses1, txtClasses2, …, txtClasses10. The control source of each textbox equals its number: =1, =2, …, =10. For example, the first subform’s link master fields = ClassID,txtClasses1, and link child fields = ClassID,ClassCategoryID, where the ClassCategoryID corresponds with the txtClasses1 control source. However, this is currently only showing what classes have been checked--not the entire lists of classes.
The record source for the subform is: SELECT Classes.ClassID, Classes.Class, Classes.ClassCategoryID, ClassCategories.ClassCategory, Classes.ClassesSubcategoryID, ClassesSubcategories.ClassesSubcategory FROM ClassesSubcategories INNER JOIN (ClassCategories INNER JOIN Classes ON ClassCategories.ClassCategoryID = Classes.ClassCategoryID) ON ClassesSubcategories.ClassesSubcategoryID = Classes.ClassesSubcategoryID;