AfterUpdate Now() to table

M

MeSteve

I am using:
CurrentDb.Execute "UPDATE tbl_Projects SET DateUpdated = Now()"
as suggested here, but it is updating ALL records, how do I specify the
record that was actully changed?
 
R

ruralguy via AccessMonster.com

If you are talking about TimeStamping a record that was updated on a form
then you want your code in the BeforeUpdate event of the form. In this case
you do not need SQL but simply:
[DateUpdated] = Now
 
D

Douglas J. Steele

CurrentDb.Execute "UPDATE tbl_Projects SET DateUpdated = Now() " & _
"WHERE ID = " & Me.ID

(or whatever's necessary to uniquely identify the row)
 

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

Top