R
Rudi
Name Projects1 Hours1 Projects2 Hours2
Projects3 Hours3
User1 ProjectA 3 ProjectB 5
ProjectA 1
User1 ProjectB 2 ProjectB 3
ProjectA 2
User1 ProjectA 1 ProjectB 7
ProjectB 3
Now, I want the totals (preferably in a report)
Totals for User1 for Period A (the user is the CurrentUser() and the period
is a chosen date from a form. The user on the form chooses the year and month
and all the entries in that month is displayed in the query result
--------------------------------------------------------------------------------
Projects TotalHours (This is basically what I want in the end)
ProjectA 7
ProjectB 2
--------------------------------------------------------------------------------
Below is my query is SQL-view.
SELECT Timesheet.Date, Timesheet.Project1, Timesheet.Project2,
Timesheet.Project3, Timesheet.ProjectHours1, Timesheet.ProjectHours2,
Timesheet.ProjectHours3, Timesheet.Names
FROM Timesheet
WHERE (((Timesheet.Date) Between DateSerial(Forms![Timesheet Report
Selection]!Years,Forms![Timesheet Report Selection]!Months,20) And
DateSerial(Forms![Timesheet Report Selection]!Years,Forms![Timesheet Report
Selection]!Months+1,19)) And ((Timesheet.Names)=Forms![Timesheet Report
Selection]!Names))
ORDER BY Timesheet.Date;
As you will see, there is 3 project slots a choice of several projects
(ProjectA, projectB, etc). For each project there is spesific hours assigned.
The query works fine for generating a complete report, but now I want to sum
the totals of hours worked on each project for the duration spesified from
the form and generate a report from this (like I showed above).
How can I do this?
Thanks!
Projects3 Hours3
User1 ProjectA 3 ProjectB 5
ProjectA 1
User1 ProjectB 2 ProjectB 3
ProjectA 2
User1 ProjectA 1 ProjectB 7
ProjectB 3
Now, I want the totals (preferably in a report)
Totals for User1 for Period A (the user is the CurrentUser() and the period
is a chosen date from a form. The user on the form chooses the year and month
and all the entries in that month is displayed in the query result
--------------------------------------------------------------------------------
Projects TotalHours (This is basically what I want in the end)
ProjectA 7
ProjectB 2
--------------------------------------------------------------------------------
Below is my query is SQL-view.
SELECT Timesheet.Date, Timesheet.Project1, Timesheet.Project2,
Timesheet.Project3, Timesheet.ProjectHours1, Timesheet.ProjectHours2,
Timesheet.ProjectHours3, Timesheet.Names
FROM Timesheet
WHERE (((Timesheet.Date) Between DateSerial(Forms![Timesheet Report
Selection]!Years,Forms![Timesheet Report Selection]!Months,20) And
DateSerial(Forms![Timesheet Report Selection]!Years,Forms![Timesheet Report
Selection]!Months+1,19)) And ((Timesheet.Names)=Forms![Timesheet Report
Selection]!Names))
ORDER BY Timesheet.Date;
As you will see, there is 3 project slots a choice of several projects
(ProjectA, projectB, etc). For each project there is spesific hours assigned.
The query works fine for generating a complete report, but now I want to sum
the totals of hours worked on each project for the duration spesified from
the form and generate a report from this (like I showed above).
How can I do this?
Thanks!