Auto populate date field with current date IF anything on the form is revised.

SteveL13
SteveL13 used Ask the Experts™
on
I have a form with two date fields.  One is DateCreated  (txtDateCreated), which is a manual entry field.  The other is DateRevised (txtDateRevised).  If the user makes a change in the form OR sub-forms, I want DateRevised to populate with the current date.  How can I do this?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
President / Owner CARDA Consultants Inc.
Distinguished Expert 2018
Commented:
What about using the Before Update event to set the DateRevised value

Me.DateRevised = Now()

Open in new window

Paul Cook-GilesSenior Application Developer
Commented:
And to update DateRevised if anything on the subform(s) is changed, use

Parent.txtDateRevised = Now()

in the BeforeUpdate event of the subform.
Paul Cook-GilesSenior Application Developer

Commented:
Glad we could help!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial