how to do a calculation in a table field?

puffdog

Registered User.
Local time
Today, 22:48
Joined
Jul 30, 2003
Messages
17
Pls... may anybody please tell me how to do a calculation in a table field?
like column A =5 , column B = 5.
then how to let column C will do a calculation to make it show 10?

A B C
5 5 10

Thanks for telling me...:confused:
 
Why

I believe you would need to do your calculations through a query.

If you explain why you need to do this in a table, we could help a bit more.

Michael
 
Thanks for reply..
ok let me explain it more detail..
i have a table that have a field name price and Quantity
then i have a field name TotalPrice.
so can you please tell me how or where can i do a coding to show the calculation result in the field TotalPrice??

like
Price Qty Total
$2.00 2 $4.00

How to count and show the Total in a field?
i hope this will make u more understand what i am doing.
 
puff,

You are perfectly on track. Your table should store the price and
quantity.

You can use a query to calculate the total price for display on
a form or report. If you started keeping the calculated value
in your data, you would create all kinds of problems maintaining
your data.

Never store anything that you can calculate.

Wayne
 
Thanks Wayne,
Actually i'm not familiar with access, can u please tell me how to do it at query to calculate the total price and display on
a form or report.
So as you mean for the thing like TotalPrice we should not put it in my data table,is it?

Thanks,
Puff
 
You'd be better calculating this on a form:

For your Total Cost, you would make three textboxes.

1. Call this txtQuantity; set it's controlsource to Quanity (from the query)
2. Call the 2nd, txtPrice; set it's controlsource to Price (from the query)

3. Set the controlsource of the third to be: =Quantity*Price
 

Users who are viewing this thread

Back
Top Bottom