View Full Version : Dsum... I think!


danielle_r
04-23-2007, 02:18 AM
Hi,

I have a table that contains Product, Manufacturer, Date and Cost and want to have a field that sums up totals based on criteria, for example, total cost for each manufacturer over a set period.

I think I need to use a dsum, but although I've tried to structure this query, I'm getting nowhere fast!

Any help is appreciated!!

P.s. I have no sql expereince, so please can any response not include a brilliant, but greek-to-me sql! :o

ColinEssex
04-23-2007, 02:26 AM
It's easier to do the totals in the report. The report wizard will take you through it.

Remember, there's no need to store totals, these can be calculated on an as-and-when basis.

Col

neileg
04-23-2007, 02:28 AM
More likely you want a totals query. When in query design view, click the sigma button Σ.

Edit: overlapped with Colin's posting

danielle_r
04-23-2007, 02:30 AM
Hey Col,

Thanks for that, but I want to have the total as a calculated field (think that's what it's called!)

Cheers
D

danielle_r
04-23-2007, 02:32 AM
Thanks Neil,

I've tried the Total function, but if for example, the manufacturer has 2 products I get a total for each, not the grand total for the manufacturer, which is what I'm after.

Any ideas?

Cheers
Danielle

neileg
04-23-2007, 02:45 AM
Thanks Neil,

I've tried the Total function, but if for example, the manufacturer has 2 products I get a total for each, not the grand total for the manufacturer, which is what I'm after.

Any ideas?

Cheers
DanielleThe totals query will group by any field that you include in the query. So if you include product specific data, you'll get a total by product. Exclude any field that is product specific, and it will group by manufacturer.