brFindNext Method Example

Sub Search_Click()

Dim oFile As clsD3File

Dim oIndex As clsD3Index

Dim sSearch As String

 

OpenConnection ' Subroutine to establish connection

 

Set oFile = oConn.brOpenFile("customers")

Set oIndex = oFile.brRoot("a1")

 

' Retrieve a search criteria from text box

sSearch = Text2.Text

Combo1.Clear

' A combo box will contain all customers with

' a name beginning with search criteria

Do While oIndex.brFindNext(sSearch)

Combo1.AddItem oIndex.brIndexKey

Loop

 

oConn.brCloseFile oFile

CloseConnection ' Subroutine to close connection

End Sub