Choosing Multiple Items in a List Box
Hi All,
I have form with a List Box (StudentList), with several items (Al, Bill, Chu, and Dave, ...).
I also have a Command Button that opens another form (Grades), that shows student grades. Now, I want to be able to pick multiple students from list box StudentList, and click on a Command Button SEE GRADES, and open form FrmGrades and see only the students (and their grades) that I picked from the list box.
This seems like it should be easy to do, but I've only been able to get it to work for one student at a time.
The code I have for the Command Button is:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FrmGrades"
stLinkCriteria = "[Student]=" & "'" & Me.StudentList.Column(0) & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
I believe that I need to do some sort of For-Next loop, but I can't get the code to work.
Anybody know how to do this?
Thanks.
Henry
|