这是使用多选ListBox控件的代码示例。 这个领域似乎使我们许多成员感到困惑和困难。
Dim valSelect As Variant
Dim strValue As String ' just used for the demonstration
For Each valSelect In Me.listboxName.ItemsSelected
strValue = strValue & "'" & Me.listboxName.ItemData(valSelect) & "', "
Next valSelect
' to remove trailing comma
strValue = Left(strValue, Len(strValue)-2)
From: https://bytes.com/topic/access/insights/589890-retrieve-values-multi-select-listbox