473,473 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Adding values in the same field given certain values in other fields

2 New Member
I want to add the values of one field for two different values in another field and come up with a sum total of many entires. For example; One field contains a specific type of work ranging from typing to landscaping to flying and others. Another field contains the hours worked in each specific type and yet a third field specifies the gender of the person working. Is it posible to generate a report that will show you how many hours are worked by women flying and typing? If so how do I implement this into my report such that it will show totals for a variety of other fields with duplicate entires. thanks much!
Sep 7 '06 #1
3 2049
MMcCarthy
14,534 Recognized Expert Moderator MVP
SELECT gender, typeOfWork, sum([hoursWorked]) SumHoursWorked, gender FROM tablename GROUP BY gender, typeOfWork;



I want to add the values of one field for two different values in another field and come up with a sum total of many entires. For example; One field contains a specific type of work ranging from typing to landscaping to flying and others. Another field contains the hours worked in each specific type and yet a third field specifies the gender of the person working. Is it posible to generate a report that will show you how many hours are worked by women flying and typing? If so how do I implement this into my report such that it will show totals for a variety of other fields with duplicate entires. thanks much!
Sep 7 '06 #2
ElJefe
2 New Member
SELECT gender, typeOfWork, sum([hoursWorked]) SumHoursWorked, gender FROM tablename GROUP BY gender, typeOfWork;
Sorry I am pretty new to access and I don't quite follow what you mean by this. Do I somehow enter all of that into a combo box?
Sep 7 '06 #3
MMcCarthy
14,534 Recognized Expert Moderator MVP
You don't say what else you want to appear on your report but since you're new to access I would say that you could open a new query in SQL design view and copy and paste this in. Then use this query in your report.

Sorry I am pretty new to access and I don't quite follow what you mean by this. Do I somehow enter all of that into a combo box?
Sep 7 '06 #4

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

Similar topics

20
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
5
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for...
3
by: JOEP | last post by:
What do I need to do to allow an append query to post null values to records in a field of the destination table? Basically I want to allow records with null values to post to the table. The append...
2
by: Viorel | last post by:
Adding new row with default values. In order to insert programmatically a new row into a database table, without direct "INSERT INTO" SQL statement, I use the well-known DataTable.NewRow,...
7
by: Aaron Smith | last post by:
How do I set field default values at runtime? Say I want a check box that is bound to a boolean field to default to false for a certain set of criteria, and then true for others? I also need to do...
5
by: rdemyan via AccessMonster.com | last post by:
I have a table with about 80 fields. I'm using an import process to populate the table. It works fine, except for the following: Users generally don't specify values for a lot of numerical...
2
by: dympna | last post by:
Hi can anyone suggest a fix for this... as I am a novice in access. I have created a training table with the following fields Employee Name - joe Training Received - Fork lift Date Received...
10
by: Nils Magnus | last post by:
Hello, I've just started using SQL to LINQ to access my SQL Server tables, and it's a wonderful tool. Are there any equally elegant ways to store and access historic values for the objects? For...
9
Catalyst159
by: Catalyst159 | last post by:
I have a form which is used to calculate residential Floor Area Ratio (FAR). The form is structured into seven parts as follows: Part A: Maximum FAR and Floor Area: Part B: Gross Floor Area of...
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
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...
1
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...
0
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.