Add log when modified

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table called logs with the following fields:
LogID: autonumeric
ApplicationID
FieldModified
DateModified

And I would like that every time someone modifies the table Applications, a
log is created that tells me which application was modified [ApplicationID],
which field from the Application Table [FieldModified] and the date it was
modified [DateModified]

Could anyone provide me with the code that would allow making this possible?

Thank you for our help.
 
I don't think there's anyway to do that automatically - there's no 'On Table
Update' event procedure or anything like that. It seems that you just need
to go to the VBA code anwhere that table gets updated and add code there to
add a new record to the log table. I don;t see any other way of doing it.
You'd probably want to create a 'global' Function called something like
WriteLogRecord and pass parameters to it that tell it the Application ID and
Field modified (the function would just use Date() for the date modified).
 
Back
Top