Move Method

See Also   Example   Applies To   Specifics

Moves the position of the current record in a Recordset object.

Syntax

recordset.Move rows, start

The Move method syntax has these parts.

Part Description
recordset An object variable that represents the Recordset object whose current record position is being moved.
rows A signed Long value specifying the number of rows the position will move. If rows is greater than 0, the position is moved forward (toward the end of the file). If rows is less than 0, the position is moved backward (toward the beginning of the file).
startbookmark Optional. A Variant (String subtype) value identifying a bookmark. If you specify startbookmark, the move begins relative to this bookmark. Otherwise, Move begins from the current record.

Remarks

If you use Move to position the current record pointer before the first record, the current record pointer moves to the beginning of the file. If the Recordset contains no records and its BOF property is True, using this method to move backward causes an error.

If you use Move to position the current record pointer after the last record, the current record pointer position moves to the end of the file. If the Recordset contains no records and its EOF property is True, then using this method to move forward causes an error.

If either the BOF or EOF property is True and you attempt to use the Move method without a valid bookmark, a run-time error occurs.

Notes