Discussion Locked

auto sum 4 columns, link col in dif tbl

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm creating a access tracking applications, and Iwant to link certain columns in diffierent tables, for read only. And I want to get columns to perform addition and subtraction and total in a table/form?

1 reply

by mohammad_m_saggaf

if you are looking for a sql statment try this:
SELECT (TABLE1.Col1 + Table2.Col2 + Table3.Col3 + Table4.Col4) as "SumCol" FROM table1, table2, table3, table4 WHERE ....

where:
- table1, table2, table3, table4 are table names.
- Col1, Col2, Col3, Col4 are column names.
- SumCol is the returned column which contain the sum or differance accourding to the math operators between the columns.
- after the WHERE statment you should add the conditions for the querey.

I hope it helped.

This discussion is closed to new replies.