Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using form query in report

Status
Not open for further replies.

kronar

Programmer
Jan 12, 2003
60
US
I am using a query in a subform and want to us it in a subreport. table is multiple time sheets by date, subform and subreport show time accumulated by emplyee. So each time is hours summed per employee. In the report footer I want to sum all employees hours into one total. It works in the sub form but not the subreport? Any tips?
Querry used is:
SELECT J.JB_JobBidNo, J.JBT_EmpNum, E.EM_FirstName, E.EM_LastName, Sum(J.JBT_WorkHrs) AS HbE, E.EM_Wage, (Sum(J.JBT_WorkHrs)*E.EM_Wage) AS Tot
FROM EM_Emp AS E INNER JOIN JBT_EmpTime AS J ON E.EM_EmpNumber = J.JBT_EmpNum
WHERE J.JB_JobBidNo=[Forms]![frmMenu]![txtJobNum]
GROUP BY J.JB_JobBidNo, J.JBT_EmpNum, E.EM_FirstName, E.EM_LastName, E.EM_Wage
ORDER BY J.JBT_EmpNum;
The total is a text field with source of Sum(HbE), i get error? instead of the total total.
 
Good call...
I just found in my book that page footers don't support agregate functions so I moved the text box to the report footer - now it WORKS...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top