Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How track all changes made to a record in Microsoft Access

Avatar of tranvangiang17
tranvangiang17 asked on
Microsoft AccessMicrosoft Applications
20 Comments1 Solution777 ViewsLast Modified:
Dear Experts:

I was requested to add a “Date/Time” field on a table to time-stamp a new record and / or any changes on the record (inputting from a input form).  The new filed called “DateModified” was added onto the table (and an invisible “DateModified” text box on the input form as well); then I add the following code In the before update event:

Private Sub DATE_MODIFIED_BeforeUpdate(Cancel As Integer)
        Me!DateModified = Now()
End Sub

However, the “DateModified” has been time-stamped even though there is NO changes made to the record at all (I have just opened form to view the record and exit the form without any changes).

Please help me to correct the problem: That is, only set the “DateModified” to “Now()” value whenever there is any changes in the record or newly created record..
 Input Form with added DateModified field.jpg DateModified Time-Stamped.jpg
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)Flag of United States of America imageDatabase Architect / Application Developer
This problem has been solved!
Unlock 1 Answer and 20 Comments.
See Answers