automatic date update

  • Thread starter Thread starter Kay Davies
  • Start date Start date
K

Kay Davies

Hello

I have an "updated" field in a contacts table. Data is
entered using a form. It is likely that this data will be
edited also via this form. The "updated" field is a date
field and if any of the other fields are changed via the
form I would like the date to automatically update to the
current day ie the date the change was made.

I had thought that a line of code could be executed 'on
update' but wasn't sure what that should be. I would be
grateful for any help.

Many thanks
Kay
 
Hi Kay

Use the Form_BeforeUpdate event:
Me.[UpdateTimeField] = Now

This will change the field just before the new (or updated) record is saved.
 
Back
Top