Article ID: 112292
Article Last Modified on 5/6/2003
'********************************************************************
' FUNCTION: IsNewRecord()
'
' PURPOSE:
' Determines if the record in the active form is the new record.
'
' RETURNS:
' True - If the record is the new record.
' False - If the record is not the new record.
'
'********************************************************************
Function IsNewRecord ()
Const NO_CURRENT_RECORD = 3021
Dim RetVal
On Error Resume Next
' Try to reference the bookmark property of the current record.
RetVal = Screen.ActiveForm.Bookmark
If Err = NO_CURRENT_RECORD Then
IsNewRecord = True
Else
IsNewRecord = False
End If
End Function
Macro Name Condition Action
------------------------------------------
CheckForNewRecord IsNewRecord() MsgBox
CheckForNewRecord Actions
-------------------------
MsgBox
Message: "In the new record!"
CheckForNewRecord
Keywords: kbhowto kbusage KB112292