Private Sub Form_Activate()
connection ' the Connection is a code in module contains codes are needed to make the connection between form and the database
fill_schools fill_majors
End Sub
Private Sub fill_schools() With rs
.Open "select DISTINCT schName from tblSchoolsInfo", cn, 2, 3
Do While Not .EOF
cboSchool.AddItem (.Fields(0))
.MoveNext
Loop
End With rs.Close End Sub
Private Sub fill_majors()
With rs .Open "select DISTINCT mjrName from tblSchoolsInfo where schName= '" & Me.cboSchool & " '", cn, 2, 3
Do While Not .EOF
cboMajors.AddItem (.Fields(0))
.MoveNext
Loop
End With
End Sub
Now: the first combo gets correct values but the second one is completely Empty! could anybody help me please? thanks in advanced
This post has been edited by BobRodes: 03 February 2013 - 05:11 PM
Reason for edit:: Please use code tags in future.

New Topic/Question
Reply



MultiQuote





|