Auto revision-date field

M

MikeF

Does anyone have a simple piece of code for a date field that automatically
updates to "today's" date whenever any field in the record is changed?
Imagine it would go in the form's OnChange. [?]

*** Once the form is finished [if that ever happens!] its properties will be
set to Me.AllowEdits = False until and EditThisRecord button is clicked.
Perhaps that could be a trigger.

Also, any pointers or previous negative experience with this type of field?

Regards,
- Mike
 
A

Allen Browne

Use the BeforeUpdate event procedure of the *form* (not controls.)

Add the line:
Me.[YourDateField] = Date()

Use Now() instead of Date() if you want the time as well as the date.
 

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