How to get a calculated Total from a textbox into a Table

StanJx

Registered User.
Local time
Today, 18:40
Joined
Apr 5, 2012
Messages
21
Hi,

I am new to access and databases. I have 2 tables with the respective fields:-

1) tblItemMaster - ItemCode(PK,Related), ItemDes, Product, Rate
2) tblQuotationDetail - ReferenceNo(PK), QuotationDate, ItemCode(Related), Qty, Total

I need to calculate the Total by multiplying Qty with Rate. I do not know how to calculate them as they are on two different tables. But at the moment I have added a Textbox on the form called txtTotal giving this Expression =[Rate]*[Qty] I get the calculation in the Textbox but I need the amount to be registered in to the table tblQuotationDetail, Total Field. Could somebody please give me a solution for this.

Thanks in advance,
Stan
 
Last edited:
Welcome to the forum!

In general, calculated values should not be stored in the table, only the values that go into making the calculation. If you put a calculated value in a table and you change one of the values that went into the calcuation the total is not automatically updated.

Using a form as you have done is one way to show the total. Another way is to use a query. You would bring in both table and join them by the key fields and add a calculated field that does the calculation.
 
Welcome to the forum!

In general, calculated values should not be stored in the table, only the values that go into making the calculation. If you put a calculated value in a table and you change one of the values that went into the calcuation the total is not automatically updated.

Using a form as you have done is one way to show the total. Another way is to use a query. You would bring in both table and join them by the key fields and add a calculated field that does the calculation.

Hi,
Thanks for your reply, I am not that familiar with queries. But I think i know how get the calculation. but could you give me some information on how to get the perspective record of the query to show in the form.

Thanks in advance
 

Users who are viewing this thread

Back
Top Bottom