How do I add numbers across columns of a single record?

J

jennyls

I have a column that lists items. I then have three columns next that list
the number of items in each storage location. I would like to create a query
that will add all three storage areas to give me a total of each item. I
would even be pleased to create a new column on the worksheet that would
total the storage areas. I can only seem to run totals down a column not
across a record.

Thank you!!
 
G

Gina Whipp

jennyls,

Columns in an Access table are ot like columns in an Excel Spreadsheet. To
do what you want you would have to create a query and put:

MyTotalsColumn:
Nz([NameOfColumn1],0)+Nz([NameOfColumn2],0)+Nz([NameOfColumn3],0)

On another note, I wonder if you are not committing spreadsheet with Access.
Or if you think Access is Excel on steriods (you refer to a table as a
worksheet). Perhaps you should review the Northwind database that came with
your version of Access.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
C

Clifford Bass

Hi Jenny,

Just create a calculated column:

select Item, BinA, BinB, BinC, BinA + BinB + BinC as AllBins
from tblItems;

In the query designer you would enter it like this in a blank cell on
the top row:

AllBins: BinA + BinB + BinC

If any of the BinX values can be null, you can use:

AllBins: IIf(IsNull(BinA), 0, BinA) + IIf(IsNull(BinB), 0, BinB) +
IIf(IsNull(BinC), 0, BinC)

Hope that helps,

Clifford Bass
 

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