DateCreated and DateModified

S

Shael

I have a table with CreatedDate and UpdatedDate fields. I am setting the
default value of CreatedDate to Now(). How can I populate the UpdatedDate
field when the record is updated? Can I leverage the DateModified property?
 
A

Arvin Meyer [MVP]

In the BeforeUpdate event of your form add a procedure:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.UpdatedDate = Now
End Sub
 
K

Krzysztof Pozorek [MVP]

(...)
I'm using Access as a back-end for an ASP.Net app. I'm not using Access
forms.

In this case, You have to place suitable actualization in Your query string.
On example:
UPDATE Table1 SET Field1 = 123, UpdatedDate = Now();

K.P.
 
Top