Hello fellow Access users,
I have a listbox with 2 columns that populates from a query depending on a drop down that the user selects. I need to capture all the results from the list box which can range from 1 to 100. I thought I had an idea on how to do it, but it does not work. Below is what I came up with, was using the same theory of a recordset to loop through values to transfer the data to the text box, but it only writes one.
I have a listbox with 2 columns that populates from a query depending on a drop down that the user selects. I need to capture all the results from the list box which can range from 1 to 100. I thought I had an idea on how to do it, but it does not work. Below is what I came up with, was using the same theory of a recordset to loop through values to transfer the data to the text box, but it only writes one.
Code:
Dim i As Long
For i = 0 To Me.lstviewresults.ListCount - 1
Me.txtcombined = Me.lstviewresults.Column(0, i)& Me.lstviewresults.Column(1, i)
Next i