简体   繁体   中英

Record audit log from subform

I have form with a subform. Whenever someone changes a value in the subform the old record and the new record are recorded to an audit table. I have an additional field of a yes/no datatype on the subform. Its only purpose for being there is to be used for filtering on another form. Is there any way to write all the fields to the audit log except the yes/no field? Right now it records the entire record because the subform is bound to the table. But I do not want the yes/no field to be recorded along with the other fields. Let me know if you need to see any part of what I have.

You did not specify how you save the data from the subform to the audit table.

I assume you use bound textfields or combo-boxes or anything like that? If yes just unbound the yes/no-field.

Just put a qualifier in your write code on Type or Name or whatever you have;

If ctl.Type <> acCheckBox then
<Write to log>
end if


If FieldName <> "UnwantedCheckBox" then
<Write to log>
end if

I use this code in each form for total control;

https://stackoverflow.com/a/27737258/4411380

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM