I have 4 tabs with a list box in each. Each list box executes the same query On Click. This query populates a SECONDARY list box. So 4 independent list boxes update 1 query that populates 1 list box.
By opening the query after I click on each list box I can see that the code executes properly for all 4 list boxes. However the SECONDARY list box only populates based the 1st of the 4 list boxes within the tabs. When I click on the second list box, I can see that the query executes properly but the SECONDARY list box stays empty. The same problem happens with the 3rd and 4th list boxes within the tabs.
By opening the query after I click on each list box I can see that the code executes properly for all 4 list boxes. However the SECONDARY list box only populates based the 1st of the 4 list boxes within the tabs. When I click on the second list box, I can see that the query executes properly but the SECONDARY list box stays empty. The same problem happens with the 3rd and 4th list boxes within the tabs.
Code:
Private Sub lstCompetencyOne_Click()
Me!lstDeliverable.Requery
End Sub
Private Sub lstCompetencyTwo_Click()
Me!lstDeliverable.Requery
End Sub
Private Sub lstCompetencyThree_Click()
Me!lstDeliverable.Requery
End Sub
Private Sub lstCompetencyFour_Click()
Me!lstDeliverable.Requery
End Sub
Code:
SELECT qryTasks.[CompetencyID], qryTasks.[DeliverableID], qryTasks.[DeliverableDescription], qryTasks.[Focus]
FROM qryTasks
WHERE ((qryTasks.CompetencyID)=Forms!frmCourse!lstCompetencyOne Or (qryTasks.CompetencyID)=Forms!frmCourse!lstCompetencyTwo Or (qryTasks.CompetencyID)=Forms!frmCourse!lstCompetencyThree Or (qryTasks.CompetencyID)=Forms!frmCourse!lstCompetencyFour);