summarizing records

camedeiros

Registered User.
Local time
Today, 02:32
Joined
Oct 13, 2003
Messages
10
I would like to sum a specific field for 2 records.
Ex.:
Customer Id Address dues
Coca-cola 23 1 oak street $75
Coca-cola 24 1 oak street $100

If, in my query, I just included the field "customer", "address", and "dues", and used a sum function to add the "dues", Acccess would sort the sum by (sortBy) customer and address, and it wouldn't be a problem because those field are the same on both records. So it would create one single record, with only "customer", "address", and "dues", with the total dues.

However, if I want to include ID, it won't let me sum because that field is different...and then Access wouldn't know which one to use (23 or 24) in my new, single record. Is there a way that I can summarize those two records, and still have all my fields. Maybe by having a way to "tell" Access to ignore the second id and take just the first one, sort of writing one id over the other so I can have my single, sumed record?

I really need this today, so if anyone could help I would greatly appreciate it!
 
In query Design View, for the ID field, select First instead of Group By
.
 
Last edited:
the reason is that, once I merge those duplicates by summing them, I will have to link them to the table where they originally came from. So I need the unique key in order to link this new table that result from this query, and the big original one. If you all in this thread could please look at the new question that I will post right now I would appreciate it.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom