why does this code work in one form but not the others?

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:

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:
So what does it do or not do?

only just realised it didn't work for both forms!!!

It should stamp the date if it is not a new record....:(
 
Is WhenUpdated the name of your field or the name of your control?
 

Users who are viewing this thread

Back
Top Bottom