Solved Calculate Difference Between Two Columns in Access Table (1 Viewer)

hrdpgajjar

Registered User.
Local time
Today, 08:48
Joined
Sep 24, 2019
Messages
76
Hi All,
I have table which have two columns as under,

1. Dispatch Amount
2. WO Amount

Now I need a calculated third column as "Difference Amount"

I've tried to enter difference formula in "Default value" section of third column but not works.

Another option is creating a query. but i am not sure how to do it.


Please guide me how can i do this.


Thanks
 
for query, goto query designer:

SELECT [Dispatch Amount], [WO Amount], [Dispatch Amount] - [WO Amount] As [Difference Amount] FROM YourTableName;
 
One does not normally store calculated values in tables. Use the query like arnelgp explained.
 
But i must have to use the calculated data for my other operations and reports.

Which means that you base those other operations and reports on the query, not the raw table. Most of Access doesn't "care" whether you are using a raw table or a query. Both are sources of recordsets, which is what Access REALLY wants behind the scenes. Storing a calculated value is proper IF you can't (or don't) store ALL of the factors of the computation (think "retail sales with spot markdowns" and "credit card payments based on daily international monetary exchange conversion rates"). When you can store everything for the required computation, compute it in a query or in a computation in a form's control.
 

Users who are viewing this thread

Back
Top Bottom