Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Summing fields in query.

Status
Not open for further replies.

Kingsteveiv

Technical User
Oct 8, 2001
20
US
i have a query that has 3 fields in it.

1. part number
2. customer
3. Number of Containers

I want to be able to add another field called "SUM CONT" that sums the number of containers according to the part number and customer.

ex.

PN Customer Num Cont SUM CONT
1 A 6 10
1 A 4 10
2 A 7 12
2 A 5 12
1 B 6 11
1 B 5 11
2 B 8 12
2 B 4 12

Is there anyway that this can be done? Please Help.

Thank you.
 
Yes, use a totals query with only the PN, Num Cont, and Customer fields on the QBE grid. Press the Sum button on the toolbar. Leave the Pn and Customer field's total property set to Group By and change the Num Cont total property to Sum.
 
I have another question for you.

I added another field called time to the query that summed the number of containers above. I want to multiply that field to the sum of containers field. When i do this, and open up the query it returns a "Enter Parameter Value" box. If i just hit ok, it open up the query with the correct values, but i do not want it to come up at all. What can i do to get rid of this??

thxs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top