timestamp

rexb

Registered User.
Local time
Today, 00:33
Joined
Oct 29, 2008
Messages
129
I have 2 fields. datecreated and modifieddate. I want to save the date and time when a record is added and see who last edited/modified the record. I used now() and save it on the fields. I tried putting a code on dirty and do after_update but it doesn't save it on modifieddate.

need help please
 
This should do the job:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord Then
 Me.DateCreated = Now()
Else
 Me.ModifiedDate = Now()
End If
End Sub
 
Missingling,

You are awesome. Thank you! It works perfectly well.
 

Users who are viewing this thread

Back
Top Bottom