View Single Post
  #3  
Old November 16th, 2009, 10:31 AM posted to microsoft.public.access.tablesdbdesign
NAHolmes
external usenet poster
 
Posts: 17
Default Sum of field value based upon multiple instances of another va



"John W. Vinson" wrote:

On Sun, 15 Nov 2009 03:55:01 -0800, NAHolmes
wrote:

I have a table with the following fields:

ITEM
TOTAL
REF

The data is imported from Excel & the value in the ITEM field may be
repeated for an instance in the REF field.

So for 3 different REF values, the ITEM values may appear up to 3 times.

Is it possible to produce a query which will show the total for each ITEM,
rather than each instance?

Thanks in advance.


Certainly. Create a Query based on the table; select the ITEM and TOTAL
fields. CHange the query to a Totals query by clicking the Greek Sigma icon
(summation sign, looks like a sideways M).

Leave the default GROUP BY for Item and change it to SUM for Total.

Since each row of the result will refer to three different REF values, you
shouldn't display that field - there are tricks if you need to do so.
--

John W. Vinson [MVP]
.
Many thanks John. I guessed it would be something simple. I do indeed need to filter by the ref field, but I already have a series of other queries & a form to do that. I have just modified to relevant query for TOTALS & it works a treat.


Thanks again.