Moves the record pointer to a particular record.
DoCmd.GoToRecord [ObjectType][, ObjectName][, Record][, Offset]
with the following parameters:
ObjectType
An AcDataObjectType constant indicating the type of data in which the record pointer is to move. Possible values are acActiveDataObject (the currently active data object, which is the default value), acDataForm (a form’s data), acDataFunction, acDataQuery (a query’s data), acDataServerView, acDataStoredProcedure, and acDataTable (a table’s data).
ObjectName
The name of the object of type ObjectType.
Record
An AcRecord constant indicating the record to go to. Possible values are acFirst (the first record), acGoTo (go to the record specified by the Offset argument), acLast (the last record), acNewRec (a new record), acNext (the next record, which is the default value), and acPrevious (the previous record).
Offset
The number of records to move backward (if Record is acPrevious) or forward (if Record is acNext), or the record number to go to (if Record is acGoTo).
See the example for the FindRecord method.
When used with acGoTo, Record represents the position of the record in the current recordset. This is not a permanent value, but rather it changes when records are added and deleted and the recordset is sorted.
The GoToRecord method corresponds to selecting the Edit | GoTo menu option.