Access JumpStart 2.0 | Blog

A Rapid Development Framework for Microsoft Access

I am currently exploring the phenomenon that happens to different fields in a form that are bound to the same underlying table field.

For an example I have two text fields (TestText and TestTextAlso) on a form that are both bound to the same underlying TestText column in the table.

The method that I am currently using to audit the form is the BeforeUpdate method of the form to detect when the underlying data changes. It then loops through the form fields and checks their OldValue and Value properties to see what changed.

It is storing the field name and the before and after values of the control.

In this case, with 2 different fields bound to the same data, they both present as having changed, even though I only changed one of them.

This is causing me to consider the whole premise of what I am doing here. Would do I think my user of this FormAudit class really wants?

Going back to my test reference module I had said this:

The form auditor keeps track of any changes to the form as the form is changed.
Test which controls are bound and whether they were updated.

Me

I think going forward here, I (and by extension the consumer of my class) will want to know what the field was actually bound to as well as the name of the field that changed. That way the consumer can decide what to do based either on field name or on the bound table/query column name.

So, now that we know, next time I will look at adding the bound value to the AuditFieldChange object which is part of the dictionary by Field Name that makes up the FieldChanges dictionary of the FormAuditor object.