Name
Recordset.Find Method — (Versions 2.0, 2.1, 2.5, 2.6)
Synopsis
recordset.Find (Criteria, SkipRows, SearchDirections, Start)The Find method moves the record pointer to a row within the current recordset that matches the single-column search criteria specified.
Arguments
-
Criteria(String) Specifies a single-column search criteria in the form of
'ColumnOperatorValue'. The Column portion is a name of a column in the Recordset object. The Operator can be>,<,=,>=,<=,<>, orLIKE. The value can be written as a string, floating point number, or date. Strings are deliminated with single strings or number signs (#) and dates are deliminated with number signs (#). When using theLIKEoperator, asterisks (*) can be used at the end or both the beginning and the end of the value ('*jr*','jr*'). If the asterisks is used at the beginning only, an error will occur.
-
SkipRows(Long) Optional. Indicates how many rows to skip before searching the recordset for a match to the
Criteriaargument. The default is 0, meaning the search will begin on the current row.
-
SearchDirection(SearchDirectionEnum) Optional. Indicates whether to search forward or backward through the recordset. If a match is not found and a forward search is being done, the record pointer will point to the EOF marker. If a backward search is done and a match is not found, the record pointer will point to the BOF marker. By default, a forward search is done.
-
Start(Variant) Optional. Specifies a starting position for the search ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access