sum query

  • Thread starter Thread starter max_power
  • Start date Start date
M

max_power

Guest
Hello,

I'm a newbie to access so any help is much appreciated.

I've got Fields in a table
ID, Date, cost1.

There might be 5 instances of ID for one date and there might be 100 instances of cost for a particular date.
I'm trying to sum for each individual ID, the date and total cost1...
So instead of having 100 lines in the table, I'll have
Id1 date1 total cost
id2 date1 total cost
.......
id5 date1 total cost

Many thanks for any help

Max
 
Hi Max
First of all would be a good idea to put an autonumber field in your table so that each entry has a unique reference.
As to the query, what you need is a grouping query.
Open up a new query and add the ID, date and cost fields, then click on the ∑ button. This will set each field to "Group by".
Leave ID and date as "Group by" but chance the cost field to "Sum"

You might have to play a bit but I think this will get you on the right path
Good luck
 

Users who are viewing this thread

Back
Top Bottom