Actually, the kind of code needs to be in the Form_BeforeUpdate event. This event will fire if and only if a change has been made to the Record. The user could Dirty the Record, change their mind, and end up not changing any data, but having the code in that event would indicate (wrongly) that the Record was modified! Choosing the proper event is, indeed, critical.
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not Me.NewRecord Then
Me.modified_rec = Now()
End If
End Sub
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007