Summing up only like fields

G

Guest

Please bear with me, as I am very new to access.

I have a table that consists of part numbers, class numbers and total
rejects (see sample table1). I would like to sum all the total rejects based
on class number (see table 2). Any information on how to do this would be
greatly appreciated.

Thanks, Sandy

Sample Table 1 Sample
Table 2
Part # Class # Total Rej Class #
Total Rej
12 23 10 23
18
53 24 15 24
20
45 23 8
10 24 5
 
G

Guest

:

Please bear with me, as I am very new to access.

I have a table that consists of part numbers, class numbers and total
rejects (see sample table1). I would like to sum all the total rejects
based
on class number (see table 2). Any information on how to do this would be
greatly appreciated.

Thanks, Sandy

Sample Table 1
Part # Class # Total Rej
12 23 10
53 24 15
45 23 8
10 24 5

Sample Table 2
Class # Total Rej
23 18
24 20
 
J

John W. Vinson

Please bear with me, as I am very new to access.

I have a table that consists of part numbers, class numbers and total
rejects (see sample table1). I would like to sum all the total rejects based
on class number (see table 2). Any information on how to do this would be
greatly appreciated.

Thanks, Sandy

Sample Table 1 Sample
Table 2
Part # Class # Total Rej Class #
Total Rej
12 23 10 23
18
53 24 15 24
20
45 23 8
10 24 5

Well, word wrap sure made hash of that... but I think I get the idea. Your
second "table" should NOT be a Table at all; it should be a Query, dynamically
calculating the total.

Create a new Query based on your Table1. Include the Class# and the Total Rej
fields (note that it's best to avoid the use of # and blanks in fieldnames; if
you use them you MUST always enclose the fieldnames in [square brackets].)

Change the query to a Totals query by clicking the Greek Sigma icon (looks
like a sideways M).

Leave the default Group By on [Class #] and change it to Sum on [Total rej].

You can then base a Form (for onscreen display) or Report (for printing) on
this query, and simply open that object when you need to see the results.

John W. Vinson [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