I was wondering if there was a better way to check for edits on an unbound form? I have about 15 fields that can be edited and I want to check for changes made when the user exits the form.
Currently, when I load the form, I populate the field and it's tag property with the same data. On Close of the form, I compare the two and if they aren't equal I create the edit. To do this though, I have to compare every field and set a boolean bEdit to true if there has been an edit. If so, then I open the recordset and update every field in the record because I don't know which of the fields were edited, just that at least ONE was edited.
Is there a better way to do this? I'm concerned that I'm wasting a lot of code when I could just do some function that handles it for me. Plus, every form that I have to check for edits on takes FOREVER to code if I have a lot of fields I need to compare. And then have to update everything in the record . . .
I imagine if there was a function I could create to check each field/check box for an edit and associate that field with a field in the table, I could create a generic function that would pass in any edited fields and then loop through and create a query based on the fields that need updating. Would this be possible? (I can't think how to compose the function . . .)
Thanks for the help in advance!
Currently, when I load the form, I populate the field and it's tag property with the same data. On Close of the form, I compare the two and if they aren't equal I create the edit. To do this though, I have to compare every field and set a boolean bEdit to true if there has been an edit. If so, then I open the recordset and update every field in the record because I don't know which of the fields were edited, just that at least ONE was edited.
Is there a better way to do this? I'm concerned that I'm wasting a lot of code when I could just do some function that handles it for me. Plus, every form that I have to check for edits on takes FOREVER to code if I have a lot of fields I need to compare. And then have to update everything in the record . . .
I imagine if there was a function I could create to check each field/check box for an edit and associate that field with a field in the table, I could create a generic function that would pass in any edited fields and then loop through and create a query based on the fields that need updating. Would this be possible? (I can't think how to compose the function . . .)
Thanks for the help in advance!