B
Bunky
I have two combo boxes on a form. The first one shows the supervisor and the
second one shows just the employees that are assigned to that supervisor. I
see the employees just fine but when I try to select one, it always puts the
first one in the list as the one selected. I have done this type of thing
before using two combo boxes for other purposes and they work just fine.
Here is the code.
Combo17 - Row source = SELECT Staff.Specialist AS Super, Staff.Skill FROM
Staff WHERE (((Staff.Specialist) Not Like 'No, One') AND ((Staff.Skill)='SU')
AND ((Staff.Supervisor) Not Like 'Termed')) ORDER BY Staff.Specialist; this
was done by the query builder. Then in After update - I have and Event
Procedure as follows -
Private Sub Combo17_AfterUpdate()
Combo19 = Null
Combo19.Requery
Combo19 = Me.Combo19.ItemData(0)
End Sub
In the second combo box (Combo19) I am using the following code -
SELECT Staff.Supervisor, Staff.Specialist FROM Staff WHERE
(((Staff.Supervisor)=[Forms]![SurveyDriver]![Combo17])) ORDER BY
Staff.Specialist;
That's it! but it will not allow me to select any specialist!!?????
Thanks in advance for your assistance.
second one shows just the employees that are assigned to that supervisor. I
see the employees just fine but when I try to select one, it always puts the
first one in the list as the one selected. I have done this type of thing
before using two combo boxes for other purposes and they work just fine.
Here is the code.
Combo17 - Row source = SELECT Staff.Specialist AS Super, Staff.Skill FROM
Staff WHERE (((Staff.Specialist) Not Like 'No, One') AND ((Staff.Skill)='SU')
AND ((Staff.Supervisor) Not Like 'Termed')) ORDER BY Staff.Specialist; this
was done by the query builder. Then in After update - I have and Event
Procedure as follows -
Private Sub Combo17_AfterUpdate()
Combo19 = Null
Combo19.Requery
Combo19 = Me.Combo19.ItemData(0)
End Sub
In the second combo box (Combo19) I am using the following code -
SELECT Staff.Supervisor, Staff.Specialist FROM Staff WHERE
(((Staff.Supervisor)=[Forms]![SurveyDriver]![Combo17])) ORDER BY
Staff.Specialist;
That's it! but it will not allow me to select any specialist!!?????
Thanks in advance for your assistance.