CurrentRecord Property

Applies To

Form.

Description

Use the CurrentRecord property to identify the current record in the recordset being viewed on a form.

Setting

Microsoft Access sets this property to a Long Integer value that represents the current record number displayed on a form.

The CurrentRecord property is read-only in Form view and Datasheet view. It is not available in Design view. This property is available only in Visual Basic.

Remarks

The value specified by this property corresponds to the value shown in the record number box found in the lower-left corner of the form.

See Also

NewRecord Property.

Example

The following example shows how to use the CurrentRecord property to determine the record number of the current record being displayed. The general-purpose CurrentFormRecord procedure assigns the value of the current record to the variable recordnum.


Sub CurrentFormRecord(frm As Form)
    Dim recordnum As Long
    recordnum = frm.CurrentRecordSub