Help with Sub Report

  • Thread starter StevePrefontaine via AccessMonster.com
  • Start date
S

StevePrefontaine via AccessMonster.com

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top