Home All Groups Group Topic Archive Search About
Author
30 Jun 2006 8:23 PM
NMEX via AccessMonster.com
I have created a text box that does a calculation off 2 other fields. There
are instances where the calculation needs to be over written. How can I enble
this?


Author
30 Jun 2006 11:47 PM
Al Camp
NMEX,
   A calculated field should never be saved to a table.  It should not be bound to a field
at all.
   Here's an example just like yours...
        Price * Qty  = Line Total

   You wouldn't save LineTotal, just save the Price and Qty.
   You would place an unbound text control on your form named LineTotal with this
ControlSource...
        = Price * Qty
    This will always "display" the correct LineTotal on that form, AND if Price Changes or
Qty changes the Line Total will update and display automatically.
    Now... in any subsequent query, form, or report... based on the data you captured,
LineTotal can be re-calculated from the stored Price and Qty.

    For ex. later on you have a report to show Sales.  A calculated field on that report
with the same...
            = Price * Qty
will alwys give the correct results.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


Show quoteHide quote
"NMEX via AccessMonster.com" <u22857@uwe> wrote in message news:628fd3dd7fef4@uwe...
>I have created a text box that does a calculation off 2 other fields. There
> are instances where the calculation needs to be over written. How can I enble
> this?
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-security/200606/1