Best way to determine which field (ctrl on form is updated) when Form is dirty

  • Thread starter Thread starter Marcel K.
  • Start date Start date
M

Marcel K.

Greetings - I need to update existing fields in record
displayed in unbound form - i need to capture the previous
value of the control (in this case a text box) then write
it to another table. I know how .dirty on form would
indicate that the something has changed - but I need to
explicity figure just the field that change and write the
prior value to another table. I guess I could use an edit
button, then it would indicate that change is about to
occur - Any input would be appreciated.

Regards,
Marcel.
 
Marcel K. said:
Greetings - I need to update existing fields in record
displayed in unbound form - i need to capture the previous
value of the control (in this case a text box) then write
it to another table. I know how .dirty on form would
indicate that the something has changed - but I need to
explicity figure just the field that change and write the
prior value to another table. I guess I could use an edit
button, then it would indicate that change is about to
occur - Any input would be appreciated.

On an *unbound* form? That is, one with no recordsource? I think the
only ways to do this are either:

1. execute code in each control's AfterUpdate event, setting some
module-level flag or variable indicating that the control has changed.
It occurs to me you might use the control's Tag property for this.

OR

2. Save the initial values of all controls in module-level variables
when they are first loaded. Then later you can loop through the
controls and compare their current values to the values you saved.

Note that unbound forms won't even have a Dirty property.
 
Thanks for this information - This is the help I desired -
it is most useful.

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Dirty Me 6
Set form dirty through unbound control 2
Form Dirty Property 1
Is Dirty for a field? 3
Best way to determine changes made on unbound form. 1
Form Dirty 2
Escaped, But Still Dirty 7
Form "On Dirty" Event 4

Back
Top