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 |