Need Help Multiplying Fields in a Form

G

Guest

I'm trying to multiply two fields in a SubForm..in order to populate a third.
i.e. [test1]*[test2] and I want it to populate an existing field, [test3].
As it stands now, I can create it, and it works on the form...but when I go
to the corresponding tables to look at the info...it is not there.
 
G

Guest

Hi Djembe78,

You should not attempt to ever store the results of a calculation. Doing so
violates both 2nd and 3rd normal form of database design. Here is a quote
from database design expert Michael Hernandez on the topic of denormalization:

<Begin Quote>
"The most important point for you to remember is that you will always
re-introduce data integrity problems when you de-Normalize your structures!
This means that it becomes incumbent upon you or the user to deal with this
issue. Either way, it imposes an unnecessary burden upon the both of you.
De-Normalization is one issue that you'll have to weigh and decide for
yourself whether the perceived benefits are worth the extra effort it will
take to maintain the database properly."
</End Quote>

You can find this quote on page 22 of his paper, which you can download here:
http://www.datadynamicsnw.com/accesssig/downloads.htm
(See the last download titled "Understanding Normalization")


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

:

I'm trying to multiply two fields in a SubForm..in order to populate a third.
i.e. [test1]*[test2] and I want it to populate an existing field, [test3].
As it stands now, I can create it, and it works on the form...but when I go
to the corresponding tables to look at the info...it is not there.
 
A

Amy Blankenship

Great! That's exactly what you want. Never store anything you can
calculate. Simply duplicate the same calculation in any queries or reports
that need to view the data.

HTH;

Amy
 
K

Ken Snell \(MVP\)

An obligatory "cautionary" note here: it's usually unnecessary and often
ill-advised to store calculated values in a table. Most usually, the
calculated value can be obtained at any time by simply doing the calculation
in a query to show the result.

But, assuming that you have a good reason for doing this, you'll need to
tell us more about the subform and how it's being used. If the third textbox
is bound to a field in the table (its Control Source is the name of that
field in the subform' s RecordSource query), then you'll need to use some
event on the subform to "trigger" the calculation to be performed and to be
written into the third textbox's Value property.

So, tell us more.
 

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

Top