It only appears that 0's are being written. If your form's controls are not
bound to an underlying field, they are NOT being saved to the table. In
that instance, I'm guessing the table definition includes a default value of
0 for those fields in which you are seeing zeros.
Note again from my earlier response ... it is RARELY a good idea to save
calculated values. If you'll describe a bit more about your situation/your
data, the folks who volunteer their time here in the newsgroups may be able
to understand enough to tell you that your situation is one of those rare
times when saving calculated values makes sense ... or not!
Good luck
Regards
Jeff Boyce
Microsoft Office/Access MVP
Vincent
I'm not sure I understand...
You have fields in a table.
You add those fields to a form, so you can display them.
You add other fields to the form, not connected to any table, so you can
show calculated values.
You wonder why the calculated values are not being saved to the table ...
why would they be? There's no place for them.
Also, it is only rarely necessary to store calculated values, and doing so
creates a whole new series of potential issues/problems you would have to
add code to manage.
For example, say someone made a mistake entering one of the "raw" data
values, then goes back to correct/fix the mistake. How is the stored
calculated value supposed to get updated?
Regards
Jeff Boyce
Microsoft Office/Access MVP
- Show quoted text -
My apologies for the lack of clarity in my post,
I created a form (using the form creation wizard), that contains all
of the fields from my "repairs" table. I amended a few of the fields
in the form to perform a calculation of Date Diff by putting the
formula in the control source of the properties for those fields. Now
when I click the save button on the form, it populates the table with
all of my entries. The execption is that my calculations don't transer
to the table. The calculated fields show up in the table as zeros. I
know it is because I changed the control source for those particular
fields. I guess what I want to know is there a way to have my form do
the calculation and populate the table when saved? Or if there is a
better way I am open to suggestions.
Thanks
Vincent