If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help with Sub Report
I have a subreport named rptEmployeeTimesheetSubReport who's record source is
a select query which pulls Project Number (proj_num), Discipline (Disc), Employee (employee), and Week Ending (week_end) from a table named tblEng. The criteria for employee and week_end is based on a form. I need this subreport to list each unique proj_num/disc, which is currently does. However, I also need to produce the hours spent each day of that week ending on the proj_num/disc. I initially accomplished this by using a Dlookup, which worked fine at first. However, in addition to the fields list above, there is also a task field in my tblEng table. So, a person could have identical employee, proj_num, disc, and week ending, date but two different tasks. This means there would be two records for that employee/proj_num/disc/week_end. I want these two records to sum their hours and display as one record in my sub report. For example, I have an employee, CDE with two records in tblEng. Both record's week_end is 3/29/09, date is 3/27/09, proj_num is B6021, disc is structural. However, the task different, and one has 9 hours spent, the other 8. I want my subreport to only have one record listing employee, week_end, proj_num, disc, and a sum of the hours of the two records. I'm getting hung up b/c every time I try to bring the hours into the subreport (by adding it to the query), it produces two separate records and cannot find any other way to bring the sum of the hours into the subreport. Sorry if this is long winded and any help is much appreciated. Thanks. -StevePre -- Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|