sandhurstUK
Must change my user name
- Local time
- Today, 15:37
- Joined
- Feb 15, 2002
- Messages
- 42
Below is the code from a qry in my database, which shows the work due per individual per month. However, what I need it to show is the totals grouped by month due.
Example:
The qry results currently display say 5 or 6 entries for Jul as the underlying data is the actual day a site is overdue but is displayed in MMM/YY format. What it needs to do is add up all the records for the months so that it then displays say Jul 50 IUs, Aug 75 IUs, Sept 150 IUs etc etc. (IU is the abbreviation for inspection unit, which is a straight number format).
SELECT [Work Due Grouped qry].[Surveyor Name], [Work Due Grouped qry].[Next Insp Date], Sum([Work Due Grouped qry].[SumOfIU's]) AS [SumOfSumOfIU's], Sum([SumOfIU's]/23) AS Expr1FROM [Work Due Grouped qry]
GROUP BY [Work Due Grouped qry].[Surveyor Name], [Work Due Grouped qry].[Next Insp Date];
All offers of assistance greatfully accepted
Example:
The qry results currently display say 5 or 6 entries for Jul as the underlying data is the actual day a site is overdue but is displayed in MMM/YY format. What it needs to do is add up all the records for the months so that it then displays say Jul 50 IUs, Aug 75 IUs, Sept 150 IUs etc etc. (IU is the abbreviation for inspection unit, which is a straight number format).
SELECT [Work Due Grouped qry].[Surveyor Name], [Work Due Grouped qry].[Next Insp Date], Sum([Work Due Grouped qry].[SumOfIU's]) AS [SumOfSumOfIU's], Sum([SumOfIU's]/23) AS Expr1FROM [Work Due Grouped qry]
GROUP BY [Work Due Grouped qry].[Surveyor Name], [Work Due Grouped qry].[Next Insp Date];
All offers of assistance greatfully accepted