问各位高手:listview中如何实现查找!
现在用一个类连接数据库,然后用listview连接类中数据
现在我用的查找代码如下
Dim itm As ListItem
With ctlListView
If optApartment.Value = True Then
Set itm = .FindItem(txtsearch.Text, lvwText, , lvwPartial)
Else
Set itm = .FindItem(txtsearch.Text, lvwSubItem, , lvwPartial)
End If
If Not itm Is Nothing Then
.ListItems(itm.Index).Selected = True
.SetFocus
Else
MsgBox "not found"
End If
End With
Set itm = Nothing
现在的只能实现在lvwText中查找,其他的就不可准确地在某一列中实现查找!
请教各位高手,如何实现点击不同的option以后实现在listview中的某一列进行查找!