Take a form,have a list box on the left of all names, tNames table. (LstNames)
make a combo box of the classes, so user can pick a class. CboClass.
a list box on the right to show the names on the class of the cboBox.(lstRoster)
make a select query runs and shows in the lstRoster looking at the cboClass
when user picks the class combo, update the lstRoster from the cboClass AFTERUPDATE event.
Code:
sub cboClass_afterupdate()
LstRoster.requery
end sub
now add to this list by dbl-clicking on a name in the lstNames. This fires an append query using the items on the form.
docmd.openquery "qaAdd1name2Roster"
this query looks like:
insert into tRoster (studentID, ClassID) values (forms!myForm!lstName, forms!myForm!cboClass)