I have a list box that is populated based on a previous filter (a text box). This means there is no predefined number of items in the listbox so using the index is impossible.
What I am looking for is a way of selecting the value of column(0), as there are 3 columns in my list box, of the selected line that is clicked.
Private Sub listSource_Click()
Dim strSource As String
strSource = "SELECT [Product Code],[Stock Level],[Description] FROM [products/stock] " & _
"WHERE Mid([Product Code],1,5) = " & Me.listSource.Column(0).Value & ";"
Me.listResult.RowSource = strSource
Me.listResult = vbNullString
End Sub
What I think I need is just the small piece of code that is supposed to be where "Me.listSource.Column(0).Value" is.
Thanks in advance, Bob P