G
Guest
Hi All,
I have a list box which is bound to a query containing two two fields. The
first being an ID number (this is viewed by the user), the second being a
boolean value which is defaulted to 0 (this is hidden from the user).
What I want to do is take the selected items put them into a new query that
I can use for a another form.
I have code behind a cotrol button as follows:
Dim varItem As Variant
Dim strList As String
With List01
If .MultiSelect = 0 Then
txtSelected = .Value
Else
For Each varItem In .ItemsSelected
strList = strList & .Column(0, varItem) & vbCrLf
Next varItem
MsgBox strList, , "Data From List01"
End If
End With
This is OK as it give me a list but I don't know how to take the selected
items and put them into another / new query.
Any help is greatly appreciated.
I have a list box which is bound to a query containing two two fields. The
first being an ID number (this is viewed by the user), the second being a
boolean value which is defaulted to 0 (this is hidden from the user).
What I want to do is take the selected items put them into a new query that
I can use for a another form.
I have code behind a cotrol button as follows:
Dim varItem As Variant
Dim strList As String
With List01
If .MultiSelect = 0 Then
txtSelected = .Value
Else
For Each varItem In .ItemsSelected
strList = strList & .Column(0, varItem) & vbCrLf
Next varItem
MsgBox strList, , "Data From List01"
End If
End With
This is OK as it give me a list but I don't know how to take the selected
items and put them into another / new query.
Any help is greatly appreciated.