title: display records in each subitem in listview in vb6
body: <p>In my program, I used 1st item of listview in sql query with LIKE statement and display result in subitem of same listview. There are total 100 items in 1st column of listview and I want records in subitem of listview. I used checkbox for each item and select all checkbox to display result. When  checked single item and execute query its showing proper result in subitem but when I checked all item and execute query then it's showing same result in each subitem. </p>
  
  <p>ex.</p>
  
  <pre><code>query= "select  name from company where product LIKE  '" &amp; ListView1.ListItems(I) &amp; "'"
  For I = 1 To ListView1.ListItems.Count
    If ListView1.ListItems(I).Checked = True Then
      List.SubItems(2) = ListView1.ListItems(I).ListSubItems.Add(, , my_Recordset1.Fields(0))
    End If
  Next
  </code></pre>
  
  <p>when i execute query its showing same result for all subitem.</p>