Need to automatically update date in a date field when record is changed

  • Thread starter Thread starter Stacey
  • Start date Start date
S

Stacey

I have a date field in a form that I'm using that I want to
automatically update to the current date anytime I change
any
information in that record.
Therefore, if the original date I worked on a customer
record was
6/20/03 and I changed some information on 10/30/03, I
would want it to
change the date to 10/30/03. This way, the next time I
look at the
record I will be able to know when I last changed
information and
therefore how recent and accurate the record information
is. Does
anyone know how to do this? Someone told me a long time
ago, but I
have since lost the instructions and can't remember how.
Can anyone
help?
 
In the Dirty event of the form, enter:

Me!FieldDateModified = Now()
assuming FieldDateModified is the field in the bound table or query

or

Me.txtDateModified = Now()
assuming txtDateModified is the name of the text box bound to the field
in the table.

Good luck,
Pavel
 
Back
Top