how to add/subtract two columns?

A

Anilbhide1980

I want to add or subtract the values of the two columns i.e. fields & to get
a result in the third one. How do i do this????
I simply want to do C=A+B, in this A,B,C are three different fields/columns
 
D

Douglas J. Steele

You don't want to store calculated values in tables. As fellow Access MVP
John Vinson likes to say "Storing calculated data generally accomplishes
only three things: it wastes disk space, it wastes time (a disk fetch is
much slower than almost any reasonable calculation), and it risks data
validity, since once it's stored in a table either the Total or one of the
fields that goes into the total may be changed, making the value WRONG."

Only have fields A and B in your table. Create a query that takes all of the
fields from your table, and add a computed field to it (in an empty column
of the query grid, type C: [A] + in Field row) and use the query
wherever you would otherwise have used the table.

(Just to complete the answer, it's not possible to define calculated fields
in tables in Access)
 

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