Export (0) Print
Expand All
10 out of 16 rated this helpful - Rate this topic

CurrentRecord Property [Access 2003 VBA Language Reference]

Office 2003

You can use the CurrentRecord property to identify the current record in the recordset being viewed on a form. Read/write Long.

expression.CurrentRecord

expression Required. An expression that returns one of the objects in the Applies To list.

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's not available in Design view. This property is available only by using a macro or 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.

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 lngrecordnum.

Sub CurrentFormRecord(frm As Form)
    Dim lngrecordnum As Long

    lngrecordnum = frm.CurrentRecord
End Sub
		


Applies to | Form Object | Report Object



Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.