Sum of Records

T

trinity

I have a series of records (there are about 3000), and
about 20 different areas in the following format

Main Bar $5
Main Bar -$4
Sports Bar $3
Sports Bar #2.50

ETC, and I was wondering how I could write a query that
would give me area totals eg

Main Bar $1
Sports Bar $5.50

It is for a database of monetary till discrepancies. Is
there a way of doing this? We want to find the total
discrepancy in the area, whether that be positive or
negative.

Thanks alot for your time.
 
M

Michel Walsh

Hi,



Make a new query. Bring your table. Click on the summation button on the
toolbar (the one with the capital sigma, a Greek letter that look like a M
rotated by 90 degree) and a new line, Total, appear in the grid.

Bring the field "category" in the grid, keep the proposed default GROUP BY
in the total line.

Bring the field "amount" in the grid, change the GroupBy to SUM.


That's it. Take a look at the data view! Save, and use that query, rather
than the initial table, each time you need that result, the sum will then be
up to date, freshly, easily.


If you get Rounding error, be sure the initial data type are Currency, or
Decimal (design table).


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top