David Laplante
Jan 22nd, 2000, 02:03 AM
Using the FindItem Method of a listview with the lvwSubItem parameter (telling it to search in subitems collection for the specified text) doesn't seem to be working.
Am I doing something wrong?
Here's the code:
Dim ItemFound As ListItem
Set ItemFound = lstProducts.FindItem(txtSearch.Text, IIf(fraSearchType = 1, lvwText, lvwSubItem), , lvwPartial)
If Not ItemFound Is Nothing Then lstProducts.ListItems(ItemFound.Index).Selected = True
lstProducts.SelectedItem.EnsureVisible
when fraSearchType = 1 everything works perfectly but if fraSearchType <> 1, ItemFound is always Nothing...
Any Ideas?
Am I doing something wrong?
Here's the code:
Dim ItemFound As ListItem
Set ItemFound = lstProducts.FindItem(txtSearch.Text, IIf(fraSearchType = 1, lvwText, lvwSubItem), , lvwPartial)
If Not ItemFound Is Nothing Then lstProducts.ListItems(ItemFound.Index).Selected = True
lstProducts.SelectedItem.EnsureVisible
when fraSearchType = 1 everything works perfectly but if fraSearchType <> 1, ItemFound is always Nothing...
Any Ideas?