Applies the locate criteria again to search for another row.

Syntax

<oRef>.locateNext([<rows expN>])

<oRef>

The rowset in which to move the row cursor.

<rows expN>

The Nth row to find. By default, the next row forward.

Property of

Rowset

Description

When the applyLocate( ) method is called, it moves the row cursor to the first row that matches the locate criteria. From then on, you can move forward and backward to other rows that match the same criteria by calling locateNext( ).

locateNext( ) takes an optional numeric parameter that specifies in which direction, forward or backward, to look and at which match to stop, relative to the current row position. A negative number indicates a search backward, toward the first row; a positive number indicates a search forward, toward the last row. For example, a parameter of –3 means to look backward from the current row to find the third matching row.

If the row cursor encounters the end-of-set before the desired match is found, the search stops, leaving the row cursor at the end-of-set.

As a navigation method, locateNext( ) interacts with canNavigate, onNavigate, and implicit saves. For more information, see next( ).

locateNext( ) returns true to indicate that the desired match was found and false to indicate that it wasn’t.