What is going on when I get (Access 2002) error message:
run-time error '7878':
the data has been changed
(The error message sounds to me quite confusing.)
then the VBA debugger shows a line
"
!LastModified.Value = Date
"
If I then continue running the coe, it seems to work ok.
run-time error '7878':
the data has been changed
(The error message sounds to me quite confusing.)
then the VBA debugger shows a line
"
!LastModified.Value = Date
"
If I then continue running the coe, it seems to work ok.
Code:
Private Sub btnCloseForm_Click()
If (TURVIS_CURRENT_KAYNTI_MODIFIED) Then
With Forms!afrmKirjPvk!sfrm2Perus
If IsNull(!LastModified.Value) Then
!LastModified.Value = Date
Else
If Not IsDate(!LastModified.Value) Then
!LastModified.Value = Date
Else
If (DateDiff("d", !LastModified.Value, Date) > 0) Then
!LastModified.Value = Date
End If
End If
End If
End With
End If
With Me.sfrm2Perus.Form
If IsNull(Me!ViimKayntiPvm) Then
Me!ViimKayntiPvm = !TuloAika
Else
If (Not IsNull(!TuloAika)) Then
If (IsDate(!TuloAika)) Then
If (DateDiff("d", Me!ViimKayntiPvm, !TuloAika) > 0) Then
Me!ViimKayntiPvm = !TuloAika
End If
End If
End If
End If
End With
DoCmd.Close
End Sub