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

Calculating in a Query Dilemma

3
I'm attempting to create a query that will sum data based on a certain field.
i.e.
Column 1-Date
Column 2-Pitches Thrown on That Day
Column 3-Pitchers Name

I'd like the query to count the total number of pitches thrown by each pitcher on a user-specified time frame ([Start Date]<[End Date]) and, if possible, count the occurences of records for that pitcher as well (would be the # of starts this season). Any help is appreciated!
Aug 6 '07 #1
5 1216
Rabbit
12,516 Expert Mod 8TB
Ok, what have you tried so far?
Aug 6 '07 #2
JSaks
3
I have a dlookup() expression set up in a column of the query - and I know what's wrong, I just don't know how to fix it! (My last statement in the expression points to itself - "[Name]=[Name]"... I just don't know what to put to get it to 'loop' through)

Right now the query is just pulling the first record found so - easiest way to put it:

What I want:

Date Name Pitches Thrown Total Pitches Thrown
1/1/07 John Smith 17 17
1/13/07 Mark Johnson 13 13
1/17/07 John Smith 9 26
1/22/07 Mark Johnson 22 35


What I'm getting:

Date Name Pitches Thrown Total Pitches Thrown
1/1/07 John Smith 17 17
1/13/07 Mark Johnson 13 17
1/17/07 John Smith 9 17
1/22/07 Mark Johnson 22 17
Aug 6 '07 #3
Rabbit
12,516 Expert Mod 8TB
Have you tried using the totals? In Query Design, click View > Totals. This lets you set up an aggregate query and grouping values.
Aug 6 '07 #4
JSaks
3
That worked! Thanks.
Aug 10 '07 #5
Rabbit
12,516 Expert Mod 8TB
That worked! Thanks.
Not a problem.
Aug 10 '07 #6

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

Similar topics

6
by: Xenophobe | last post by:
I know this isn't a MySQL forum, but my question is related to a PHP project. I have two tables. table1 table2 "table1" contains 2 columns, ID and FirstName:
2
by: Eric Whittaker | last post by:
here's my dilemma, on the program below, i am trying to calculate overtime pay at time and a half, but instead of only counting the hours after 40, it counts all hrs at that rate, how can i avoid...
1
by: Joe Bongiardina | last post by:
What does the message "calculating...." mean in the lower left status area of a form? I have a form with no calculated, concatenated or lookup fields, yet it displays this msg. The form takes...
1
by: Robert Neville | last post by:
The solution to my dilemma seems straight-forward, yet my mind has not been forthcoming with a direct route. My Project form has a tab control with multiple sub-forms; these distinct sub-forms...
1
by: jlm | last post by:
I have a form which feeds table (TblEmpLeave) of Employee Leave Time (time taken off for Administrative, Annual, Sick, Compensation leave). I have EmpID, LeaveDate, LeaveType, LeaveHours fields on...
3
by: Paul Mendez | last post by:
Performance_Date SumOfBudget_NOI CurrYTD_BudgetNOI_Total 1/1/2004 $4,184,626.00 ? 2/1/2004 $4,484,710.00 ? 3/1/2004 $4,537,424.00 ? 4/1/2004 ...
1
by: Tony Williams | last post by:
I have a table with two fields, txtvalue (a number field) and txtmonth ( a date/time field). I want to create a report that shows the difference in value between the value in txtvalue in one value...
2
by: LLLiddle | last post by:
As an Access learner, I'm tearing my hair out over what is probably a simple problem. I hope someone can help. I have a table for Clients (tbl.Clients with pkClientID). Each client may use...
5
by: eliana82 | last post by:
I have problems calculating score percentages within groups. I have created a boat program in access where the information provided is name, team, boat and score. The first query I've done is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.