I need some help with the following:
I have a form with a subform.
The main form is linked to a table
On the main form, there is a text box
This text box has a control source that is a forumula
After entering data in the subform, the text box with the formula gets
updated with data
I am trying to do the following:
After the textbox with the formula gets updated with data, I am trying to
save that to a column in table that the form is connected to.
I have tried all the properties of the text box (ie dirty, before change,
after change, etc) and the form also, but the column in the table is not
getting updated.
How can I automate this process. Currently I have a command button that
updates the column in question.
Thanks,
Sam Berry
John Vinson - 15 Jan 2005 06:42 GMT
>After the textbox with the formula gets updated with data, I am trying to
>save that to a column in table that the form is connected to.
Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.
Just redo the calculation whenever you need it, either as a
calculated field in a Query or just as you're now doing it -
in the control source of a Form or a Report textbox.
John W. Vinson[MVP]