Re: Simply adding two fields
- From: John W. Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 23 Nov 2007 11:40:30 -0700
On Thu, 22 Nov 2007 06:07:02 -0800, Pat Backowski
<PatBackowski@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
I'm reading a transaction file of widgets delivered and I want to update the
quantity in the master record, so I do a query joining the master and
transaction data. That works fine. I've also created a new element in the
resulting table, lets call it answer. I want "answer" to be the sum of two
elements that are in the table, one from the master and one from the
transaction.
How do I do that?
Generally, you don't.
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]
.
- Follow-Ups:
- Re: Simply adding two fields
- From: Pat Backowski
- Re: Simply adding two fields
- Prev by Date: Re: Updating Make-table query
- Next by Date: Re: Automating a series of repeated queries
- Previous by thread: Re: Updating Make-table query
- Next by thread: Re: Simply adding two fields
- Index(es):
Relevant Pages
|