Calculating Sums in Query

aml5171

Registered User.
Local time
Today, 13:46
Joined
Feb 17, 2011
Messages
41
I have been creating a database for my company to capture and track our portfolio of open insurance policies on a multitude of "Mobile Oil Rigs". Every policy has its own policy number/ID but there can be multiple policies per "vessel".

What I would like to be able to do is to run a query by "Vessel Name" to sum the open exposure under all the policies for a given vessel. Is there something I can put in the "criteria" section to say ifvesselname "Rotterdam" then have a sum for exposure?

I feel like there is a simple solution to this query, I am just not sure how to get there. Any help is much appreciated. If more details or information regarding the database is needed I will gladly provide in a follow up post.

Thanks in advance for your time and consideration.
 
If you can provide more info about your table structure, fields and relationships, someone should be able to offer you advice on how to design a query to get the data you need.
 
Hi aml5171:

1. Create a new query and select the fields you want from the parent table.

2. Add the 'group' function by clicking the Sigma symbol (like the autosum in Excel).

3. In a new column in the query, in the top row create the following expression:

TITLE: Sum([TABLENAME]![FIELDNAME])

Where: TITLE = the name you want to give your totals field; TABLENAME = the name of the table that contains the field you want to add up; and FIELDNAME = the name of the field you want to total.

4. Delete the word 'group' from your new field

5. That should do it.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom