[mso] Re: Access Question

Hi Linda,

You must be using Group By on one or more other fields, and that is what is 
giving you problems. The values will be summed up, but in groups defined by 
the Group By columns. You can't have the grouped values and the overall sum in 
one query.

(Well, you can, actually, but you would have to do it by creating a UNION type 
query and plug in the SQL for the two recordsets you want to union, the 
grouped data and the overall summed data. That would be pretty unusual, and 
not something that would be very useful in most cases. But if you want, let me 
know and I can post an example.)

Back to the original question, you can do this in two queries. One would be 
the grouped values, as you already have. The other would remove the Group By 
fields to result in the overall sums.

In a report, much the same thing is done behind the scenes when you have a 
report group on some field and sum([field]) text boxes in the group footer and 
report footer. The summed fields in the group footer are the results of using 
the Group By columns, the summed fields in the report footer are the results 
of the summed fields with the grouping removed.

Hope that helps,

Ron
> Ok...this should be easy but I'll be damned if I can figure it out.
> 
> I have a calculated control in a query which multiplies my ListPrice field
> by my QuantityOnHand field to give me the total value of inventory.  It
> looks like this:
> 
> WholesaleValue:[ListPrice]*[QuantityOnHand]
> 
> Now I want a TOTAL for that column in my query.  Is this possible?  Access
> Help says I can add all the values in one field, but no matter what I do, it
> just gives me the same values that are in my WholesaleValue calculation.
> 
> I set the Total row to Expression and I added a calculated control that says
> Total:Sum([WholesaleValue]) but what I end up with are two columns in my
> query, WholesaleValue and Total, and they have EXACTLY the same numbers in
> them.  What I want is a total of all the values in my WholesaleValue column.
> How the heck do I do this?
> 
> I'm doing this for someone who insists it has to be done in Access....if
> this were Excel, it would be a snap, but good ol' Access has to make

> everything so difficult LOL
> 
> Any help would be appreciated...thanks.
> 
> Linda
> Linda's Computer Stop
> http://personal-computer-tutor.com
> ABC Free Ezine ~ Free Ebooks and Tutorials
> *all outgoing mail scanned by Norton AV.  If you got a bug that looks like
> it came from me, it did NOT!
> 
> 
> *************************************************************
> You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
> MicrosoftOffice@xxxxxxxxxxxxxxxx
> 
> To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
> 
> To Unsubscribe from this group, send an email to 
> mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
> the subject line.
> 
> Or, visit the group's homepage and use the dropdown menu.  This will also 
> allow 
> you to change your email settings to digest or vacation (no mail).
> http://www.freelists.org/webpage/mso
> 
> To be able to use the files section for sharing files with the group, send a 
> request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation 
> with 
> instructions.  Once you are a member of the files group, you can go here to 
> upload/download files:
> http://www.smartgroups.com/vault/msofiles
> *************************************************************
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: