This is more of a theoretical question since it will generally be impractical to implement.
Let's say I have a form that's bound directly to a table and the table has about 25 fields. Now I'd like to detect when the user makes a change to a record and simply log the change. For example, if they change the Cost or the Retail Price, I'd like to log that price change.
I might log the change made in a table or a text file. I'm not concerned about that aspect. I'm interested in how you would recommend going about detecting the change.
Normally I would probably use a variable to store the value of Cost using the Form's OnCurrent event and then check the value of cost during the BeforeUpdate or AfterUpdate event for the form. Since I'd like to do this for all fields, I'm wondering if there is a cleaner solution, maybe one that uses an array.
Let's say I have a form that's bound directly to a table and the table has about 25 fields. Now I'd like to detect when the user makes a change to a record and simply log the change. For example, if they change the Cost or the Retail Price, I'd like to log that price change.
I might log the change made in a table or a text file. I'm not concerned about that aspect. I'm interested in how you would recommend going about detecting the change.
Normally I would probably use a variable to store the value of Cost using the Form's OnCurrent event and then check the value of cost during the BeforeUpdate or AfterUpdate event for the form. Since I'd like to do this for all fields, I'm wondering if there is a cleaner solution, maybe one that uses an array.