yhchen
Registered User.
- Local time
- Yesterday, 20:17
- Joined
- Jul 6, 2008
- Messages
- 63
why doesn't this code work?
I have been trying to figure this out for whole day but not very successfully... so I am hoping someone here will be able to spot the error...
I googled this datestamp method:
It worked once (somehow) and then just doesn't work anymore.... any idea?
I have been trying to figure this out for whole day but not very successfully... so I am hoping someone here will be able to spot the error...
I googled this datestamp method:
You will need to add two date/time fields to your table to hold the details
of when the record was created, and when the record was updated.
For the WhenCreated field, you can just set the Default Value property to:
=Now()
For the WhenUpdated field, you need to use the BeforeUpdate event of the
*form* to assign this value:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not Me.NewRecord Then
Me.[WhenUpdated] = Now()
End If
End Sub
It worked once (somehow) and then just doesn't work anymore.... any idea?
Last edited: