In a situation like this, I would use a Multi Select List Box with the Multi
Select property set to extended.
Then to use the items selected by the user, you will need to use the
ItemsSelected collection of the list box to determine which employees the
user has selected. There is a good example in VBA Help of how to use this
collection.
Here is a function I use for a similar situation:
Private Function BuildWhereCondition(strControl As String) As String
'Set up the WhereCondition Argument for the reports
Dim varItem As Variant
Dim strWhere As String
Dim ctl As Control
Set ctl = Me.Controls(strControl)
Select Case ctl.ItemsSelected.Count
Case 0 'Include All
strWhere = ""
Case 1 'Only One Selected
strWhere = "= '" & _
ctl.ItemData(ctl.ItemsSelected(0)) & "'"
Case Else 'Multiple Selection
strWhere = " IN ("
With ctl
For Each varItem In .ItemsSelected
strWhere = strWhere & "'" & .ItemData(varItem) & "', "
Next varItem
End With
strWhere = Left(strWhere, Len(strWhere) - 2) & ")"
End Select
BuildWhereCondition = strWhere
End Function
It returns a string that will filter your report based on the items
selected. You call it by passing the name of the ListBox as as string to the
function and then open your report using it:
DoCmd.OpenReport "MyReportName", , , BuildWhere("MyListBoxName")