Basic Question About Queries Tab

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to make subtotals in Access if no primary key is assigned.
For example: Bob and Sharon share a cash register. I have a spreadsheet with
both of there names hundreds of times in column "A". I have the amount they
charged at transaction in column "B". Is there a way to show Bobs name once
and Sharon's name once with a grand total of all the money they have charged?

Any help appreciated.
 
Yes, but you don't explain what you are using to show the grand total. I
will presume it's a Form or Report.

Have a look at
DSum ("TransactionCharge", "TransactionsTable")

and also
RunningSum
 
The parawon said:
Is there a way to make subtotals in Access if no primary key is assigned.
For example: Bob and Sharon share a cash register. I have a spreadsheet with
both of there names hundreds of times in column "A". I have the amount they
charged at transaction in column "B". Is there a way to show Bobs name once
and Sharon's name once with a grand total of all the money they have charged?

Any help appreciated.

Assuming that you have the table in Access (either linked to, or imported
from, your spreadsheet), that it's called "Cash", and it has fields "Person"
and "Amount", then this query will do it for you:

SELECT Person, SUM(Amount) PersonTotal FROM Cash GROUP BY Person
 
Back
Top