G
Guest
I need to do what seems to be a simple thing.
I have a form based on a table. When the user updates any field, I want to
update a field on the underlying table with the date/time of the update. I
tried using the beforeupdate event, then using the recordset:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim rst As DAO.Recordset
Set rst = Me.Recordset
With rst
.Edit
!dtLastUpdate = Now
.Update
End With
MsgBox ("BeforeUpdate")
End Sub
I get error 3426 - action was cancelled by an associated object.
What am I doing wrong?
Thanks!
I have a form based on a table. When the user updates any field, I want to
update a field on the underlying table with the date/time of the update. I
tried using the beforeupdate event, then using the recordset:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim rst As DAO.Recordset
Set rst = Me.Recordset
With rst
.Edit
!dtLastUpdate = Now
.Update
End With
MsgBox ("BeforeUpdate")
End Sub
I get error 3426 - action was cancelled by an associated object.
What am I doing wrong?
Thanks!