Sub DispSelectedItem_textchanged(Old As String, New As String)
Private SearchFor, SiteName, SiteNameUP, SearchForUP As String
If RowIDList.Size < 1 Then
KBentry = False
DispSelectedItem.Text = "NO SITES IN LIST"
Sleep(500)
Else
If KBentry Then
'Search for first Entry starting with text entered by keyboard.
SearchFor= DispSelectedItem.Text
For CurrentIndex = 0 To RowIDList.Size - 1
SiteName = SQL1.ExecQuerySingleResult("SELECT SiteName FROM sites WHERE rowid = " & RowIDList.Get(CurrentIndex))
SiteNameUP = SiteName.ToUpperCase 'SiteName and SearchFor converted to UpperCase to make search case insensitive.
SearchForUP = SearchFor.ToUpperCase
If SiteNameUP.StartsWith(SearchForUP) Then 'Finds first Entry starting with entered text but does not scroll to it.
FindString(SiteName) 'FindString finds the full site name and scrolls the lis to display it.
Exit
End If
Next
End If
End If
KBentry = True
End Sub
Sub FindString(s As String)
Dim jo As JavaObject = wbvTable
jo.RunMethod("findAllAsync", Array(s))
End Sub