Is this possible?

  • Thread starter Thread starter Dudley Wright
  • Start date Start date
D

Dudley Wright

One of my tables has 11 fields. The data in one field is editted
infrequently, but those edits are critical.
My question is, is it possible to construct a query that will indicate
that the data in a field has changed? If yes, how could I implement
this?
Thanks
Dudley
 
Dear Dudley:

Your description is insufficient to say exactly how to do this.

"indicate that the data in a field has changed"

Does this mean if it has ever changed? Changed since a certain
date/time?

If you add a datetime for LastChanged to the table, you could save
that using events on any form that could update this column. With a
SQL Server or MSDE back end you could do it with a trigger very
nicely. If you have a Jet database and allow users to edit the table
in a datasheet, this may not be possible.

Anyway, you would store the current date/time using Now() to update
this whenever the column changes. In a form, code it to check the
value of the column against OldValue to see if it really changed. You
could also save the PreviousValue if that would be of interest.

A more complex way is to log every change in another table, showing
the date/time and new value. But if you are running MSDE, you would
already have this log generated automatically, at least between
backups, longer if desired.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top