Table w/Calculated Fields???

G

Guest

There are a number of fields that I require to appear in a table (for
querying, and because they are a part of our fundamental database structure),
but that have no need for the user to input them, and in fact user input
could even lead to errors. I require the following fields-

Pertaining to Invoices:
LINE TOTAL = [PRICE] * [QUANTITY]
INVOICE TOTAL = sum([DETAILS]![LINE TOTAL]) (per invoice)
TAX = [CUST]![TAXRATE] * [INVOICE]![TOTAL]
ITEMS = Count of [ITEM]

I have a DETAILS and INVOICE table (the DETAILS table contains the Items,
and the INVOICE table contains basic Invoice Info).

The goal is to have these fields be calculated for new records as they are
being entered (as invoices are "generated"), and to have that data stored
directly to fields in the table as well for later querying, updating, and
viewing.

Any thoughts?
 
G

Graham Mandeno

There is no need to store any of these data in any tables.

They can and should be calculated in queries and those queries used to view
the data.
 

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