NewRecord Property

Applies To

Form.

Description

You can use the NewRecord property to determine whether the current record is a new record.

Setting

The NewRecord property has the following settings.


The NewRecord property is read-only in Form view and Datasheet view. It is not available in Design view. This property is available only in macros, or Visual Basic.

Remarks

When a user has moved to a new record, the NewRecord property setting will be True whether the user has started to edit the record or not.

See Also

CurrentRecord Property.

Example

The following example shows how to use the NewRecord property to determine if the current record is a new record. The NewRecordMark procedure sets the current record to the variable newrec. If the record is new, a string is assigned to the string variable newmsg.


Sub NewRecordMark(frm As Form)
    Dim newrec As Integer
    Dim newmsg As String
    newrec = frm.NewRecord
    If newrec = True Then
        newmsg = "new record"
    End IfSub