DateCreated and DateModified

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
In the BeforeUpdate event of your form add a procedure:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.UpdatedDate = Now
End Sub
 
I'm using Access as a back-end for an ASP.Net app. I'm not using Access forms.
 
(...)
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top