View Single Post
  #4  
Old December 28th, 2009, 09:31 PM posted to microsoft.public.access.tablesdbdesign
David W. Fenton
external usenet poster
 
Posts: 3,373
Default How do I save the date a record was last modified in Access 2003

"Allen Browne" wrote in
:

Use the BeforeUpdate event of the *form* where the records are
edited, e.g.:
Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.[WhateverYourFieldIsCalled] = Now()
End Sub


Keep in mind that Now() returns a full date/time value with both
date and time. I generally only record the date when records are
updated (which is generally sufficient for the purposes in my apps),
using Date() instead of Now().

If the time were important, I'd probably put it in a separate
column, because it makes querying on date ranges simpler.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/