Hi
Wonder if anyone can offer any advice on this one? I get an error "update or cancel update without add new or edit" which seems to point to this code. I really can't see why, can anyone see what I am missing? I am using MS Access 2010.
Many thanks in advance.
Janeyg
Wonder if anyone can offer any advice on this one? I get an error "update or cancel update without add new or edit" which seems to point to this code. I really can't see why, can anyone see what I am missing? I am using MS Access 2010.
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
'Store when record was last modified and by who.
'Initially stores when the record was entered.
If Me.NewRecord = True Then Exit Sub 'Exit if new record
Me.DateLastModified.Value = Now()
Me.LastModifiedBy.Value = getUser()
End Sub
Many thanks in advance.
Janeyg
Last edited: