Evaluating Which Items Are Selected in the Multiselect List Box
Private Sub cmdRunReports_Click()
Dim varItem As Variant
Dim lst As ListBox
Set lst = Me.yourList
If lst.MultiSelect > 0 Then
If lst.ItemsSelected.Count > 0 Then
For Each varItem In lst.ItemsSelected
DoCmd.OpenReport lst.ItemData(varItem), acViewPreview
Next varItem
End If
End If
End Sub
Related examples in the same category