G
Gary Hull
I ran across a problem today when trying to sync two Comboboxs.
The Combobox’s are cboTeacherLookup, and cboClassLookup.
The Data is coming from a Table, tblStudent.
tblStudent contains the following fields
guidStudent
fkTeacher
fkClass
Student
Here is the Code
Me.Filter = "fkTeacher = " & Me.cboTeacherLookup
Me.FilterOn = True
Me.cboClassLookup.RowSource = "SELECT guidStudent,fkClass FROM" & _
" tblData WHERE fkTeacher= " & cboTeacherLookup & _
" ORDER BY fkClass"
Me.cboClassLookup = Me.cboClassLookup.ItemData(0)
The problem is:
The cobClassLookup field is populated with fkclass, (autonumber). I need
the code to populate cobClassLookup with the field Class from the tblclass
table instead of fkClass from the same table.
Is there any to make this work?
The Combobox’s are cboTeacherLookup, and cboClassLookup.
The Data is coming from a Table, tblStudent.
tblStudent contains the following fields
guidStudent
fkTeacher
fkClass
Student
Here is the Code
Me.Filter = "fkTeacher = " & Me.cboTeacherLookup
Me.FilterOn = True
Me.cboClassLookup.RowSource = "SELECT guidStudent,fkClass FROM" & _
" tblData WHERE fkTeacher= " & cboTeacherLookup & _
" ORDER BY fkClass"
Me.cboClassLookup = Me.cboClassLookup.ItemData(0)
The problem is:
The cobClassLookup field is populated with fkclass, (autonumber). I need
the code to populate cobClassLookup with the field Class from the tblclass
table instead of fkClass from the same table.
Is there any to make this work?