I'm Currently building a database to track employees competencies. So certain people will be qualified to do certain tasks.
E.g in a table called Data ive got
Name Tsk1 Tsk2 Tsk3 Tsk4
Bob True True False False
Billy False True True True
Bryan True False False True
I have a form (frm1) with a list box (lst1) which lists the competencies (Tsk1, Tsk2, Tsk3, Tsk4) and has multi-select.
I have another list box (lst2) which is updated when competencies are selected and shows the names of the people who match the competencies.
For selecting 1 item, I've been using a SELECT...FROM....WHERE function to update the ROWSOURCE of lst2.
_________
If Lst1 = "Tsk1" Then
tmp1 = "SELECT Data.Name"
tmp1 = tmp1 & " FROM Data "
tmp1 = tmp1 & (" WHERE (Data.Tsk1=" & True)
Me![Lst2].RowSource = tmp1
End if
__________
However i want to avoid using IF....END IF and need to incorporate multiple selection within lst1. I was thinking about using FOR EACH....IN....NEXT but i'm struggling.
Any help would be appreciated.
E.g in a table called Data ive got
Name Tsk1 Tsk2 Tsk3 Tsk4
Bob True True False False
Billy False True True True
Bryan True False False True
I have a form (frm1) with a list box (lst1) which lists the competencies (Tsk1, Tsk2, Tsk3, Tsk4) and has multi-select.
I have another list box (lst2) which is updated when competencies are selected and shows the names of the people who match the competencies.
For selecting 1 item, I've been using a SELECT...FROM....WHERE function to update the ROWSOURCE of lst2.
_________
If Lst1 = "Tsk1" Then
tmp1 = "SELECT Data.Name"
tmp1 = tmp1 & " FROM Data "
tmp1 = tmp1 & (" WHERE (Data.Tsk1=" & True)
Me![Lst2].RowSource = tmp1
End if
__________
However i want to avoid using IF....END IF and need to incorporate multiple selection within lst1. I was thinking about using FOR EACH....IN....NEXT but i'm struggling.
Any help would be appreciated.