Applies To Form.
Description
You can use the NewRecord property to determine whether the current record is a new record.
Setting
The NewRecord property uses the following settings.
Setting | Description |
True (–1) | The current record is new. |
False (0) | The current record isn't new. |
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 intnewrec. If the record is new, a message is displayed notifying the user of this. You could run this procedure when the Current event for a form occurs.Sub NewRecordMark(frm As Form)
Dim intnewrec As Integer
intnewrec = frm.NewRecord
If intnewrec = True Then
MsgBox "You're in a new record." _
& "@Do you want to add new data?" _
& "@If not, move to an existing record."
End If
End Sub