Link 2 combo boxes

kirtney

Registered User.
Local time
Today, 15:59
Joined
May 26, 2011
Messages
14
Hey people , I am trying to link 2 combo boxes for a student database. In theory i want it to be able to select a class and the second combo box automatically show me the students assigned to that class. I tried this code but i am not sure that i wrote it right in VB. Please help


Private Sub Combo5_AfterUpdate()
Combo2.RowSource = "Select Student.StudentID, "
Student.StudentName from Student Where Student.ClassID
= " & Me!Combo5 & ";"
End Sub
 
Try searching the forum for "cascading combobox"
 
Thanks very much
 

Users who are viewing this thread

Back
Top Bottom