Add log when modified

M

Montse

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.
 
J

Jim Burke in Novi

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).
 

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