Subform - Before Update Event

I started with Martin Greens Audit code and added the fix from this thread to get it to work. I would have sworn it was fully functional the first time I checked it without errors. But when I was testing the DB to find any other fixes I noticed this issue. But It does record the changes in the audit table so now googling this error with that line.
 
OK So it looks like the issue is a null value issue. using ?ctl.Name in the immediate window indicates a field I did not change and appears to have no value. But I think one of the subforms actually starts the process with a default value which would leave me to believe that value is never written anywhere.

Does anyone have a good method for check for null value in the old and new value? I saw some posts previously where folks had issues with those type of checks in this line but I don't recall seeing a fix for it. I will have to research that some more.

I did not build this DB so not 100% on how some aspects were intended to work. I was tasked with adding some security to it. And because it is meant to be a check in and check tracking db I felt we needed auditing added to it to ensure chain of custody.
 
Resolved the issue. It turns out the problem was that the field int he form being audited is not tied to a table. The main form query sets the field called status based on other tables properties. so removing the audit tag resolved the issue in the form resolved the issue.

Is it possible to audit controls that are already tagged? I see some fields I would like to audit but they use combo box and list and drill down options in the tag property.
 

Users who are viewing this thread

Back
Top Bottom