automatic date update

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
 
G

Graham Mandeno

Hi Kay

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

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

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