Connecting Tech Pros Worldwide Forums | Help | Site Map

Access Calculations

Member
 
Join Date: Aug 2009
Posts: 36
#1: Oct 22 '09
Hi,
I have an Access database 2003 for product, orders and customer information.
I've joined them to determine the most sold product.


The results of my query looks like this:-
ProductID NumberOrdered
3001............ 2
7958............ 3
3001............ 1
3001............ 3


Now I desire to achieve the following:-
Be able to take the result of this query and have it NOW look like this:-

ProductID NumberOrdered
3001 ............ 6
7958 ............ 3

I tried the Totals (Sum/GroupBy/Count) but it changes all my product Ids to 1.
The other results of my trying just don't produce what I desire to achieve.

Any help rendered would be greatly appreciated.

Member
 
Join Date: Aug 2009
Posts: 36
#2: Oct 22 '09

re: Access Calculations


I redid it again and this time it works thanks anyways :-)
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,765
#3: Oct 22 '09

re: Access Calculations


As long as you Group by [ProductID] and Sum on the [NumberOrdered] it should be fine for you.

Welcome to Bytes!
Reply


Similar Microsoft Access / VBA bytes