473,386 Members | 1,883 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Access Query Help

I have a simple query that uses 3 fields. Location, Person and Value. When I group by location and person and sum value, I get all the results I need but I would love to see subtotals for each location. I'm using Access 2003. How do I add in the subtotals. Something like

Maryland, Person 1, 5
Maryland, Person 2, 10
Maryland Subtotal, 15, - this is the line I'm trying to get
New York, Person 1, 20
Jun 6 '07 #1
6 1224
cyberdwarf
218 Expert 100+
Could you please post your existing code for the query...
Jun 6 '07 #2
SELECT DISTINCTROW Projects.Location, Projects.Sponsor, Sum([2007 Budget].Jan) AS SumOfJan
FROM [2007 Budget] RIGHT JOIN Projects ON [2007 Budget].[Project #] = Projects.[Project #]
GROUP BY Projects.Location, Projects.Sponsor;

Could you please post your existing code for the query...
Jun 6 '07 #3
cyberdwarf
218 Expert 100+
SELECT DISTINCTROW Projects.Location, Projects.Sponsor, Sum([2007 Budget].Jan) AS SumOfJan
FROM [2007 Budget] RIGHT JOIN Projects ON [2007 Budget].[Project #] = Projects.[Project #]
GROUP BY Projects.Location, Projects.Sponsor;
Have a look at the COMPUTE clause - it may help.

Are you using Access or SQL to store your data?
Jun 6 '07 #4
Access. I just pulled the sql statement that I designed using access.


Have a look at the COMPUTE clause - it may help.

Are you using Access or SQL to store your data?
Jun 6 '07 #5
cyberdwarf
218 Expert 100+
I asked about SQL cos I know Compute works in SQL.

Have you thought about using the VB DSum function? You don't say in what context you are using your query...
Jun 6 '07 #6
cyberdwarf
218 Expert 100+
BTW

How does your query work if you add ", Sum([2007 Budget].Jan)" to the Group By clause?
Steve
Jun 6 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Morten Gulbrandsen | last post by:
Hi programmers, Good morning ;-) I think something is wrong, Running windows I believe first I have to set some password, Which creates some user, Then I can grant the required privileges, for...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
13
by: Peter James | last post by:
Access 97 If I select New on the Query tab of the db window, and go staight to sql view and type in the following for example: INSERT INTO tblMyTable ( dtDate, txtAny) VALUES (#2003-09-03#,...
1
by: Andrew McNab | last post by:
Hi folks, I have a problem with an MS Access SQL query which is being used in an Access Report, and am wondering if anyone can help. Basically, my query (shown below) gets some records from a...
5
by: Bec | last post by:
I'm in desperate need of your help.. I need to build an access database and have NO idea how to do this.. Not even where to start.. It IS for school, and am not asking anyone to do my...
52
by: Neil | last post by:
We are running an Access 2000 MDB with a SQL 7 back end. Our network guy is upgrading to Windows Server 2003 and wants to upgrade Office and SQL Server at the same time. We're moving to SQL Server...
4
by: Takeadoe | last post by:
Hey Gang, I'm gearing up to retool for the upcoming deer season here in Ohio and I could use some help with very general questions about direction. I will be scanning nearly 210,000 forms that...
1
by: hardik | last post by:
hi friends i need help in this sql query i have table like, id fid __ _____ autonumber text and i am storing values like
8
by: Sid | last post by:
I hope someone could help me with this. I am trying to setup a criteria to decide when to allow/not allow user to click on the check box. logically it looks simple but I am not able to...
6
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.