Sync ComboBox Problem

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top