FindNext Method

Object List Next Object

Defined By:
Dynaset

Description:

Finds the next occurrence of a string in the underlying database object that matches the search string. The CurrentRowNumber property is set to the Row in which the search string was found.

Declaration:

Sub FindNext(ByVal target As String)

Details:

Use FindNext with any of the other Find methods (FindFirst, FindLast, FindPrev) to search your database for records that match the criteria you specify. If Dynaset contains several records that match the criteria, FindFirst locates the first occurrence, and FindLast locates the last occurrence. FindNext and FindPrev can be used after using a FindFirst or FindLast to locate all other matches. You can use a Move operation after a Find to move to another record without matching any criteria.

If no records match the specified criteria (meaning the Find method fails), the NoMatch property is set to True and the current record remains unaffected by the Find method.

The format of the search string is dependent on the DatabaseType. For ODBC databases, the
search string format should be similar to the Where clause of an SQL statement (e.g., select * from addresses where name = 'Kenny Johnson').

For FixedAscii and DelimitedAscii, the search string will be used directly to search for it in the Dynaset's underlying database object. Additionally, for these database types, the search string can be a regular expression.


Caution: You will lose any existing changes and will not get a program exception if you are not using a DataControl under the conditions described above.

See Also:

MoveFirst, MoveLast, MoveNext, MovePrev methods, NoMatch property