Finds the first exact match or partial match in the index to the passed key.
bValue = object.brFindFirst( sKey, [ vsIId])
Parameter | Description |
---|---|
bValue | The return value is a Boolean data type that is True if an exact or partial match to sKey is found in the index. |
object | An object variable that represents a clsD3Index object. |
sKey | A String containing the search string. |
vsIId | Optional. A Variant (String subtype) containing the item-id of the first D3 item whose index matches sKey. This is an output-only parameter that returns the same result as the brIndexId property. |
If no match to sKey is found in the index, then the return value is False. The item-id returned is that of the next sequential entry in the index, unless this is past the end of the index.
If sKey is null, then the first entry in the index is returned.
Sub Search_Click() Dim oFile As clsD3File Dim oIndex As clsD3Index Dim sStart As String OpenConnection ' Subroutine to establish connection Set oFile = oConn.brOpenFile("customers") Set oIndex = oFile.brRoot("a1") ' Looking at customers with names beginning with F sStart = "F" ' Find the first and last customer with a name ' beginning with F - display results in a text box oIndex.brFindFirst(sStart) sSearchResults = "This search will result in customers: “ & oIndex.brIndexKey oIndex.brFindLast (sStart) ' Results will be displayed in text box RichTextBox1.Text = sSearchResults & " through " & oIndex.brIndexKey oConn.brCloseFile oFile CloseConnection ' Subroutine to close connection End Sub
D3IndexComKey: key - with the 'c' operator