TO GET THE TOTALS OF FEW FIELDS IN A TABLE INTO A NEW FIELD OF

G

Guest

Hi
I have created a table with fields which has got the description as
(invoice amount, retention,pst ,gst ).I have created another Field TOTAL and
need to get the sum of (invoice amount, retention,pst ,gst ) in the Total
field.

For ex:Invoice amount GST PST TOTAL
25 5 2 32

Is this possible to get in the table

Thanks in advance
 
R

Rick B

Proper database design would suggest that you don't store calculated values
in the table. If you already have the fields that make up the total, then
you don't need it in another field. When you need that total, calculate it
in your forms, reports, or queries.

Storing it in the table is redundant, slower than performing the
calculation, and leads to wrong data being entered. What if you go back and
change the invoice amount? Will you remember to fix your total field?

The short answer is "don't do it."
 
G

Guest

Thanks for the reply Rick

Can u please write down the sum function with all the sytnax so that i can
use in my query.
 
R

Rick B

You would add a new column to your query and put in the following.

InvTotal: [Invoice Amount] + [GST] + [PST]


Then, [InvTotal] would become a field in your field picker when you create a
report or form based on that query.
 
G

Guest

Thanks a lot.

Rick B said:
You would add a new column to your query and put in the following.

InvTotal: [Invoice Amount] + [GST] + [PST]


Then, [InvTotal] would become a field in your field picker when you create a
report or form based on that query.


--
Rick B



rav said:
Thanks for the reply Rick

Can u please write down the sum function with all the sytnax so that i can
use in my query.
 

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