473,698 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8035
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 "SumOfQuant ity" as the column header.

Larry Linson
Microsoft Access MVP
"Louis" <lo*******@lyco s.com> wrote in message
news:13******** *************** *@posting.googl e.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*****@localh ost.not> wrote in message news:<Pw******* ***********@nwr ddc03.gnilink.n et>...
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 "SumOfQuant ity" as the column header.

Larry Linson
Microsoft Access MVP
"Louis" <lo*******@lyco s.com> wrote in message
news:13******** *************** *@posting.googl e.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*******@lyco s.com> wrote in message
news:13******** *************** ***@posting.goo gle.com...
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*****@localh ost.not> wrote in message

news:<Pw******* ***********@nwr ddc03.gnilink.n et>...
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 "SumOfQuant ity" as the column header.

Larry Linson
Microsoft Access MVP
"Louis" <lo*******@lyco s.com> wrote in message
news:13******** *************** *@posting.googl e.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
10235
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 LANGUAGE="JavaScript"> function getServer(form){ var cdoServerName = document.frmSoftware.cdoServerName.options.value;
2
1617
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 short version is, I have created a new table to resolve a many-to-many relationship in my tech support ticket-tracking app. When I do a query which should yield me several tickets, it gives me more than one row of the same ticket if that ticket...
3
579
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 make a query that selects from a table as desribed below .. I have a table (Volunteer) that has a member field (memnumber) and a number of fields that are headed in various categories and are yes/no formated
25
10241
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 data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
3
53766
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 a specific need to only add a new field to a table if possible. Here's a simplified example of what I'm trying to do: I get a file with the following two fields: First Name
12
25272
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, GCP.Name FROM Gov_Capital_Project GCP,
2
7984
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 I've done for test purposes is use a text input file for the table field lookup properties. I thought that I'd start first by just changing the 'Display Control' property. Thanks to Allen Browne for some ideals per...
9
9692
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 master-child link to the first subform. subform2 - Master Field: subTrainingModule.Form!TrainingModuleTopicSK Child Field: TrainingModuleTopicSK
12
2459
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 tables The Tables: Table Name = tblStaticAllForecast Field Type IndexInfo
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9026
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4366
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2001
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.