Good Afternoon Pro's,
I am attempting to append values to a table that are loaded into a listbox. I have found NUMEROUS resources for this topic, however it's all regarding the .ItemsSelected property.
Question: Is there a way to Insert the values of a listbox without actually having the user select the items? Seems like a very simple task but I'm left dumbfounded. The below code works perfectly but I'd like to swap out the .ItemsSelected property with something like ".Items" Hope this makes sense. Thanks again for your time.
Paul
I am attempting to append values to a table that are loaded into a listbox. I have found NUMEROUS resources for this topic, however it's all regarding the .ItemsSelected property.
Question: Is there a way to Insert the values of a listbox without actually having the user select the items? Seems like a very simple task but I'm left dumbfounded. The below code works perfectly but I'd like to swap out the .ItemsSelected property with something like ".Items" Hope this makes sense. Thanks again for your time.
Paul
Code:
Dim varValue As Variant
Dim varitem As Variant
With Me.List
For Each varValue In List.ItemsSelected
CurrentDb.Execute "INSERT INTO [Team_Proj] ([ID], [Team_Member], ion_ID) Values " & _
"('" & Me.Text1 & "', '" & Me.List.Column(0, varValue) & "', " & Me.Text2 & ")"
Next
End With
Comment