WingandaPrayer
Technical User
- May 15, 2001
- 152
Hello,
I think I have given a reasonable(fairly) explanation this time.
Combining and Averaging Monthly figures.
How to create a function or use a query ??
Each month per year in my query has an average number of days for work completed.
The third column is shown just for my example Number of days divided by number of jobs.
April 2000……..14.00…….'70/5
May2000……….24.33…….'365/15
June2000……….34.00…….'816/24
July2000………..39.25…….'1099/28
August2000…….54.38……'1414/26
September2000…54.41.…'2231/41
October2000……40.15……'1566/39
How would I group these together thus.
And show as
April2000 to April2000……….14.00….'70/5
April2000 to May2000………...21.75…'435/20
April2000 to June2000………..28.43….'1251/44
April2000 to July2000………...32.63….'2350/72
April2000 to August2000……..38.40….'3764/98
April2000 to September2000…43.12…'5995/139
April2000 to October2000……42.47….'7561/178
I can create a query April2000 to May 2000 and so on but then only write the answer down and enter the next set of dates and do the same.
I tried creating queries for each month and then linking….didn't work.
I tried creating queries, grouping the months and then linking….didn't work.(month 4 & 5 wouldn't combine?)
I tried writing my own function(ha ha!) having seen another unrelated question using
DatePart then Format function to get the date and then
Using Select Case etc with
Case Is >= #4/1/2000# <= #4/30/2000#
MonthlyGroupings = "April 2000 - April 2000"
Case Is >= #4/1/2000# <= #5/31/2000#
MonthlyGroupings = "April 2000 - May 2000"
Etc etc etc
The query wouldn't go past the first month grouping.
Then I realised the date entered would only be counted once which isn't what I want.
Any help appreciated.
Should I continue with the individual queries,group the queries(eg April2000 to June2000 etc).If so I'm I creating these correctly.
Hoping someone is still awake and able to understand !!!!!!!
David
I think I have given a reasonable(fairly) explanation this time.
Combining and Averaging Monthly figures.
How to create a function or use a query ??
Each month per year in my query has an average number of days for work completed.
The third column is shown just for my example Number of days divided by number of jobs.
April 2000……..14.00…….'70/5
May2000……….24.33…….'365/15
June2000……….34.00…….'816/24
July2000………..39.25…….'1099/28
August2000…….54.38……'1414/26
September2000…54.41.…'2231/41
October2000……40.15……'1566/39
How would I group these together thus.
And show as
April2000 to April2000……….14.00….'70/5
April2000 to May2000………...21.75…'435/20
April2000 to June2000………..28.43….'1251/44
April2000 to July2000………...32.63….'2350/72
April2000 to August2000……..38.40….'3764/98
April2000 to September2000…43.12…'5995/139
April2000 to October2000……42.47….'7561/178
I can create a query April2000 to May 2000 and so on but then only write the answer down and enter the next set of dates and do the same.
I tried creating queries for each month and then linking….didn't work.
I tried creating queries, grouping the months and then linking….didn't work.(month 4 & 5 wouldn't combine?)
I tried writing my own function(ha ha!) having seen another unrelated question using
DatePart then Format function to get the date and then
Using Select Case etc with
Case Is >= #4/1/2000# <= #4/30/2000#
MonthlyGroupings = "April 2000 - April 2000"
Case Is >= #4/1/2000# <= #5/31/2000#
MonthlyGroupings = "April 2000 - May 2000"
Etc etc etc
The query wouldn't go past the first month grouping.
Then I realised the date entered would only be counted once which isn't what I want.
Any help appreciated.
Should I continue with the individual queries,group the queries(eg April2000 to June2000 etc).If so I'm I creating these correctly.
Hoping someone is still awake and able to understand !!!!!!!
David