title: Extract selected rows from a Listbox in Access
body: <p>In Access, I'm trying to extract the selected items from a List Box.</p>
  
  <p>I haven't used the List Box object for a while, but I seem to remember that you have to loop through the selected items and then extract them using the <code>List</code> method.</p>
  
  <p>My research supports this ascertation, but I'm running in to problems in relation to the use of <code>List</code> -</p>
  
  <blockquote>
    <p>Compile error: Method or data member not found</p>
  </blockquote>
  
  <p>Printing the <code>lstLocations.Selected(i)</code> sees <code>-1</code> returned for every selection, and <code>List</code> apparently doesn't exist, so how can extract the selected values?</p>
  
  <pre><code>Dim i As Integer
  For i = 0 To lstLocations.ListCount - 1
      If lstLocations.Selected(i) Then
          Debug.Print lstLocations.List(i)
      End If
  Next i
  </code></pre>