Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Calculations on Forms !!!

Discussion in 'Information Technology' started by zizo batal, Jul 28, 2006.

  1. zizo batal

    zizo batal
    Expand Collapse
    Guest

    I created simple calculations on a form that works just fine. However, I
    can't get it to store the values of those calculations in a specified
    field in a table!!! How can I get the form to store these calculations
    to a table ???

    Your help is really appreciated
    Thanks
    ZEE
     
  2. Loading...

    Similar Threads Forum Date
    USA Akaal Takhat Forms Committee to Represent US Sikhs Breaking News Sep 13, 2013
    India Poll reforms on crash course Breaking News Sep 7, 2013
    General A Conversation about the Grammatical Forms of Raam and Simran Hard Talk Dec 1, 2011
    India Anna Says Fast Only "Suspended", Wants Electoral Reforms Breaking News Aug 28, 2011
    India India Announces $5 bn Aid for Africa, Seeks Support for UN Reforms Breaking News May 24, 2011

  3. Tom Wickerath

    Tom Wickerath
    Expand Collapse
    Guest

    Hi Zee,

    You should not attempt to store the results of calculations; doing so
    violates database normalization rules. In general, it is better to calculate
    the results, when needed, on-the-fly.


    Tom Wickerath, Microsoft Access MVP

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

    "zizo batal" wrote:

    > I created simple calculations on a form that works just fine. However, I
    > can't get it to store the values of those calculations in a specified
    > field in a table!!! How can I get the form to store these calculations
    > to a table ???
    >
    > Your help is really appreciated
    > Thanks
    > ZEE
     
  4. zizo batal

    zizo batal
    Expand Collapse
    Guest

    Thanks Tom . . .

    However, I did the calculations using queries and then used Make-Table
    query to store the results in a table



    Tom Wickerath wrote:
    > Hi Zee,
    >
    > You should not attempt to store the results of calculations; doing so
    > violates database normalization rules. In general, it is better to calculate
    > the results, when needed, on-the-fly.
    >
    >
    > Tom Wickerath, Microsoft Access MVP
    >
    > http://www.access.qbuilt.com/html/expert_contributors.html
    > http://www.access.qbuilt.com/html/search.html
    > __________________________________________
    >
    > "zizo batal" wrote:
    >
    >> I created simple calculations on a form that works just fine. However, I
    >> can't get it to store the values of those calculations in a specified
    >> field in a table!!! How can I get the form to store these calculations
    >> to a table ???
    >>
    >> Your help is really appreciated
    >> Thanks
    >> ZEE
     
  5. Tom Wickerath

    Tom Wickerath
    Expand Collapse
    Guest

    Sure, it's possible to store the results of calculations. One method is using
    a make-table query, as you discovered. There are other methods as well. The
    point that I tried to make is that you should *not* be doing this. It
    violates the principles of good database design (called normalization rules).
    If you insist on going down this road, then suit yourself. But you'll only
    have yourself to blame later on, when you have problems with inconsistent
    data. Consider the following quote by database design expert Michael
    Hernandez:

    <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>

    This is shown on page 23 of this document, which you can download for
    yourself:

    http://www.datadynamicsnw.com/accesssig/downloads.htm
    (See the last download titled "Understanding Normalization")



    Tom Wickerath
    Microsoft Access MVP

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

    "zizo batal" wrote:

    > Thanks Tom . . .
    >
    > However, I did the calculations using queries and then used Make-Table
    > query to store the results in a table
    >
    >
    >
    > Tom Wickerath wrote:
    > > Hi Zee,
    > >
    > > You should not attempt to store the results of calculations; doing so
    > > violates database normalization rules. In general, it is better to calculate
    > > the results, when needed, on-the-fly.
    > >
    > >
    > > Tom Wickerath, Microsoft Access MVP
    > >
    > > http://www.access.qbuilt.com/html/expert_contributors.html
    > > http://www.access.qbuilt.com/html/search.html
    > > __________________________________________
    > >
    > > "zizo batal" wrote:
    > >
    > >> I created simple calculations on a form that works just fine. However, I
    > >> can't get it to store the values of those calculations in a specified
    > >> field in a table!!! How can I get the form to store these calculations
    > >> to a table ???
    > >>
    > >> Your help is really appreciated
    > >> Thanks
    > >> ZEE
     
  6. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Wed, 24 May 2006 22:21:07 GMT, zizo batal <zizobatal@hotmail.com>
    wrote:

    >However, I did the calculations using queries and then used Make-Table
    >query to store the results in a table


    I agree with Tom. Don't!

    Here's my standard spiel on the subject:

    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]
     

Share This Page