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!

No records on subreport

Status
Not open for further replies.

kronar

Programmer
Jan 12, 2003
60
US
I have a subform that pulls employee time records. The subform record source is the time query.
The time query is:
SELECT J.JB_JobBidNo, J.JB_JoborBid, 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] and J.JB_JoborBid=Yes
GROUP BY J.JB_JobBidNo, J.JBT_EmpNum, E.EM_FirstName, E.EM_LastName, E.EM_Wage
ORDER BY J.JBT_EmpNum;

How can I test for no records found to keep from having errors in the field TotalHrs whose source is =Sum([HbE])??
 
I have added a field to my job table "JB_JoborBid" with type yes/no.
However when I added J.JB_JoborBid = Yes to the query I get a pop up box to enter J.JB_JoborBid value?? Why does this not find the preset value in the table?

SELECT J.JB_JobBidNo, J.JB_JoborBid, 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] and J.JB_JoborBid=Yes
GROUP BY J.JB_JobBidNo, J.JB_JoborBid, J.JBT_EmpNum, E.EM_FirstName, E.EM_LastName, E.EM_Wage
ORDER BY J.JBT_EmpNum;
 
kronar . . .

J.JB_JoborBid = [blue]True[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top