I am getting values from TempVars, but the interesting thing is the Query fails when I qualify the the date, even when hard coded. The SQL is below.
Code:
SELECT Task.Holiday, PrimaryCustomer.Approver, BillingInfo.DTSaturday, BillingInfo.OTAfter50Hrs, BillingInfo.OTAfter40Hrs, Task.JobNo, Task.Task, Task.TaskDate, Task.Description, Task.Start, Task.Stop, Task.Lunch, Format(Abs([Start]-[Stop])*24,"0.0") AS Expr1, Task.ContractorEmployee, Task.Travel, [Contractor/Employee].EmpName, Round(IIf([Lunch],0.0208333*24,0),1) AS TimeForLunch, ([Stop]-[Start]-[TimeForLunch]) AS [Time], Round(Abs(([Start]-[Stop])*24)-[TimeForLunch],1) AS Billable, ([STRate]) AS ST, ([OTRate]) AS OT, ([DTRate]) AS DT, PrimaryCustomer.CustName, PrimaryCustomer.StreetAddress, PrimaryCustomer.City, PrimaryCustomer.StateProvince, PrimaryCustomer.ZipPostalCode, PrimaryCustomer.PONumber, PrimaryCustomer.CustJobNumber, SecondaryCustomer.CustName, SecondaryCustomer.CustJobNumber, PrimaryCustomer.Terms
FROM [Contractor/Employee] INNER JOIN ((((Task INNER JOIN BillingInfo ON Task.JobNo = BillingInfo.JobNo) INNER JOIN PrimaryCustomer ON BillingInfo.JobNo = PrimaryCustomer.JobNo) INNER JOIN SecondaryCustomer ON PrimaryCustomer.JobNo = SecondaryCustomer.JobNo) INNER JOIN EndCustomer ON SecondaryCustomer.JobNo = EndCustomer.JobNo) ON [Contractor/Employee].ID = Task.ContractorEmployee
WHERE (((Task.JobNo)=[Tempvars]![queryJobNo])
AND ((Task.TaskDate) Between #2/7/2011# And #2/8/2011#) AND ((Task.ContractorEmployee)=[TempVars]![queryEmpNo]));