473,322 Members | 1,425 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,322 software developers and data experts.

Keep original field name in a group by query

Is there a switch or a setting in Access so that a group by query
doesn't return a field name SumOf(original field name)? Especially
when you chain multiple queries together you'd get SumOfSumOfSumOf....
Anyone know? TIA.
Nov 12 '05 #1
3 8021
In the Query Grid of your Totals Query, precede the field name of the summed
field by itself and a colon. For a totals query on the Order Details in
Northwind.MDB, that gave me the SQL:

SELECT [Order Details].OrderID, Sum([Order Details].Quantity) AS Quantity
FROM [Order Details]
GROUP BY [Order Details].OrderID;

And running the query showed "Quantity" as the column header, where the
normal totals query gave the following SQL:

SELECT [Order Details].OrderID, Sum([Order Details].Quantity) AS
SumOfQuantity
FROM [Order Details]
GROUP BY [Order Details].OrderID;

and showed "SumOfQuantity" as the column header.

Larry Linson
Microsoft Access MVP
"Louis" <lo*******@lycos.com> wrote in message
news:13************************@posting.google.com ...
Is there a switch or a setting in Access so that a group by query
doesn't return a field name SumOf(original field name)? Especially
when you chain multiple queries together you'd get SumOfSumOfSumOf....
Anyone know? TIA.

Nov 12 '05 #2
Hi Larry,
Unfortunately, this is exactly what I don't want to do. Some queries
can easily have 10, 20 fields and assigning a new field name (followed
by a colon) is time consuming and tedious. Is there a feature (a
check box or something equivalent) that let's Access group by queries
return the original field name? This should be an option to users if
it's not available. TIA

"Larry Linson" <bo*****@localhost.not> wrote in message news:<Pw******************@nwrddc03.gnilink.net>.. .
In the Query Grid of your Totals Query, precede the field name of the summed
field by itself and a colon. For a totals query on the Order Details in
Northwind.MDB, that gave me the SQL:

SELECT [Order Details].OrderID, Sum([Order Details].Quantity) AS Quantity
FROM [Order Details]
GROUP BY [Order Details].OrderID;

And running the query showed "Quantity" as the column header, where the
normal totals query gave the following SQL:

SELECT [Order Details].OrderID, Sum([Order Details].Quantity) AS
SumOfQuantity
FROM [Order Details]
GROUP BY [Order Details].OrderID;

and showed "SumOfQuantity" as the column header.

Larry Linson
Microsoft Access MVP
"Louis" <lo*******@lycos.com> wrote in message
news:13************************@posting.google.com ...
Is there a switch or a setting in Access so that a group by query
doesn't return a field name SumOf(original field name)? Especially
when you chain multiple queries together you'd get SumOfSumOfSumOf....
Anyone know? TIA.

Nov 12 '05 #3
If it is an option, I am not aware of it. Sometimes things are just more
work than we'd like.

Sorry, but I'm not a good channel to get requirements to Microsoft. If I can
find one, I'll post a followup.

Larry Linson
Microsoft Access MVP

"Louis" <lo*******@lycos.com> wrote in message
news:13**************************@posting.google.c om...
Hi Larry,
Unfortunately, this is exactly what I don't want to do. Some queries
can easily have 10, 20 fields and assigning a new field name (followed
by a colon) is time consuming and tedious. Is there a feature (a
check box or something equivalent) that let's Access group by queries
return the original field name? This should be an option to users if
it's not available. TIA

"Larry Linson" <bo*****@localhost.not> wrote in message

news:<Pw******************@nwrddc03.gnilink.net>.. .
In the Query Grid of your Totals Query, precede the field name of the summed field by itself and a colon. For a totals query on the Order Details in
Northwind.MDB, that gave me the SQL:

SELECT [Order Details].OrderID, Sum([Order Details].Quantity) AS Quantity FROM [Order Details]
GROUP BY [Order Details].OrderID;

And running the query showed "Quantity" as the column header, where the
normal totals query gave the following SQL:

SELECT [Order Details].OrderID, Sum([Order Details].Quantity) AS
SumOfQuantity
FROM [Order Details]
GROUP BY [Order Details].OrderID;

and showed "SumOfQuantity" as the column header.

Larry Linson
Microsoft Access MVP
"Louis" <lo*******@lycos.com> wrote in message
news:13************************@posting.google.com ...
Is there a switch or a setting in Access so that a group by query
doesn't return a field name SumOf(original field name)? Especially
when you chain multiple queries together you'd get SumOfSumOfSumOf....
Anyone know? TIA.

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Lisa | last post by:
I have a drop down that defaults to "select" after the page refreshes. How do I keep the selected value in the dropdown field... I've tried EVERYTHING and nothing works! :( <script...
2
by: middletree | last post by:
I tried posting this to the SQL Server programming group, but then thought more about it, and thought it was more of an ASP question. If you want the original long description, it's below. But the...
3
by: John young | last post by:
I have been looking for an answer to a problem and have found this group and hope you can assist . I have been re doing a data base I have made for a car club I am with and have been trying to...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
3
by: GL | last post by:
Hi, Is there a way to add a field to an existing table using a query of some sort (without needing to manually add a field to the table). I know how to do it with a make table query, but I have...
12
by: Bill Moran | last post by:
Hey all. I've hit an SQL problem that I'm a bit mystified by. I have two different questions regarding this problem: why? and how do I work around it? The following query: SELECT GCP.id,...
2
by: Greg Strong | last post by:
Hello All, Is it possible to change table field lookup properties in code? I've been able to change other field properties in code, however so far no luck with field lookup properties. What...
9
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
12
kcdoell
by: kcdoell | last post by:
Hello: I just learned how to put crosstabs queries together but this one in particular is adding a new dimension in which I was hoping someone could give me some direction. I have the following...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.