Create Unique and sum amount

  • Thread starter Thread starter Allison S.
  • Start date Start date
A

Allison S.

I am looking to create unique records and combine donation totals which look
like this:

Donor ID Donation Participant Donor
1234 $50 Ray Day Mike Lewis
1234 $100 Chuck Lee Mike Lewis

I would really appreciate any help I can get.

P
 
I am looking to create unique records and combine donation totals which look
like this:

Donor ID Donation Participant Donor
1234 $50 Ray Day Mike Lewis
1234 $100 Chuck Lee Mike Lewis

I would really appreciate any help I can get.

P

What do you want to combine with what? Given these two rows of input, what do
you want as the output?

If you want all of Mike Lewis's donations, regardless of the Participant, just
create a Totals query based on the table. Select the DonorID, Donation, and
Donor fields - leave out the Participant. Change it to a Totals query by
clicking on the Greek Sigma icon. Leave the default Group By under DonorID and
Donor, and change it to Sum under Donation.
 
I don't understand what you mean by "create unique records" - or even why
you would think you need to. There is no need to create a (new) table to
contain such records, or to put such records into an existing table.

I assume that you simply want a query to DISPLAY donors and their total
donation. If so, all you need is:
SELECT DonorID, Donor, Sum(Donation) As TotalDonations
FROM YourTableName
GROUP BY DonorID, Donor;

HTH,

Rob
 
John W. Vinson said:
What do you want to combine with what? Given these two rows of input, what do
you want as the output?

If you want all of Mike Lewis's donations, regardless of the Participant, just
create a Totals query based on the table. Select the DonorID, Donation, and
Donor fields - leave out the Participant. Change it to a Totals query by
clicking on the Greek Sigma icon. Leave the default Group By under DonorID and
Donor, and change it to Sum under Donation.

THank you for your response John.

I do apologize I am a little new to this.

There are times when our donors give to different participants involved in
our event and also give different amounts to each.

I would like my output to be a single record which gives the donors total
donation amount. IF POSSIBLE, I would like to also include the name of the
participants the donor gave a contribution to.

There are a number of donors who gave to the event more than once. I w
 
I only want one record to be displayed.

If there are two records from the same donor for two different participants
I would like the information to display as (using previous example):

Donor ID Donation Donor
1234 150.00 Mike Lewis

and if possible I would like to include the different participant names, but
if not, no biggie. I will leave them out.
 
There are times when our donors give to different participants involved in
our event and also give different amounts to each.

I would like my output to be a single record which gives the donors total
donation amount.

The Totals query I suggested will do exactly that.
IF POSSIBLE, I would like to also include the name of the
participants the donor gave a contribution to.

Now that I don't understand. You want only one record but you want multiple
participants? They're in different records! Could you show an example of how
you want the output to look???
 
John W. Vinson said:
The Totals query I suggested will do exactly that.


Now that I don't understand. You want only one record but you want multiple
participants? They're in different records! Could you show an example of how
you want the output to look???


Hey again,

If there are two records from the same donor for two different participants
I would like the information to display as (using previous example):

Donor ID Donation Donor
1234 150.00 Mike Lewis

and if possible I would like to include the different participant names, but
if not, no biggie. I will leave them out.
 
If there are two records from the same donor for two different participants
I would like the information to display as (using previous example):

Donor ID Donation Donor
1234 150.00 Mike Lewis

<moderate frustration>

That is EXACTLY what the query I suggested will produce. Did you try it?

and if possible I would like to include the different participant names, but
if not, no biggie. I will leave them out.

If you want them as a comma separated string, you'll need some VBA code;
there's sample code at
http://www.mvps.org/access/modules/mdl0004.htm
 
Back
Top