Sum columns

O

Olden

Hello everybody,

I am a lurker here on the group, I need your help clarifying what I'm
looking for, here is my practice scenario:

I have a table with the following fields: SKU, store1, store2, store3,
store4, notes.

Each record represents a product, how many I sent to each store plus a short
memo.

Lets say I want to add all my records and be able to say store1 got 100
units, store2 got 200, and so forth (like adding your columns in excel)

What am I looking for here a query, a report... How would I do this in
access?

Thanks for any pointers,

Olden
 
M

Marshall Barton

Olden said:
I am a lurker here on the group, I need your help clarifying what I'm
looking for, here is my practice scenario:

I have a table with the following fields: SKU, store1, store2, store3,
store4, notes.

Each record represents a product, how many I sent to each store plus a short
memo.

Lets say I want to add all my records and be able to say store1 got 100
units, store2 got 200, and so forth (like adding your columns in excel)

What am I looking for here a query, a report... How would I do this in
access?


Well, you can do this, but you will run into difficulties
with other kinds of total because of your spreadsheet style
table structure. Having repeating columns like that is a
violation of the rules of database normalization.

Back to your specific question, create a Totals View Menu in
query design) type query with just the three fields store1,
store2, store3 and set the totals row for each of them to
Sum.

I'm not sure if you need a report here since the query will
return just one record, but if you do, use the query as the
report's record source.
 
J

John Spencer

You are probably looking for a totals report.

In the query grid add the fields you want to total.

Select View: Totals from the menu

In the total row, change Group By to SUM under Store1, store2, etc.
Don't include the NOTEs field
Include the SKU field and Group by it if you want sums by SKU by Store,
Otherwise remove it from your query.
 

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