This should be a simple deal but I can't seem to figure it out. Any help is appreciated.
I have 2 queries-
productionWork:
and
productionWork_crosstab:
When I run productionWork, all is well. No errors. When I run productionWork_crosstab I get "The Microsoft Jet database engine does not recognize '[Forms]![getReport]![from_txt]' as a valid field name or expression."
If I change production work to:
all runs well. How can I change it to use the dates I have on my form?
Any help is appreated. Thanks,
Andrew
a.k.a. Dark Helmet
"What's the matter Colonel Sandurz? Chicken?
I have 2 queries-
productionWork:
Code:
SELECT production.productionDate, employee.name, clProduction.hours
FROM production INNER JOIN (clProduction INNER JOIN employee ON clProduction.employeeID = employee.employeeID) ON production.productionID = clProduction.productionID
WHERE (((production.productionDate) Between [Forms]![getReport]![from_txt] And [Forms]![getReport]![to_txt]));
productionWork_crosstab:
Code:
TRANSFORM Sum(productionWork.hours) AS SumOfhours
SELECT Format([productionDate],"mmmm") AS [month], Sum(productionWork.hours) AS totalHours
FROM productionWork
GROUP BY Format([productionDate],"mmmm")
PIVOT productionWork.name;
When I run productionWork, all is well. No errors. When I run productionWork_crosstab I get "The Microsoft Jet database engine does not recognize '[Forms]![getReport]![from_txt]' as a valid field name or expression."
If I change production work to:
Code:
SELECT production.productionDate, employee.name, clProduction.hours
FROM production INNER JOIN (clProduction INNER JOIN employee ON clProduction.employeeID = employee.employeeID) ON production.productionID = clProduction.productionID
WHERE (((production.productionDate) Between #1/1/2006# And #1/18/2006#));
Any help is appreated. Thanks,
Andrew
a.k.a. Dark Helmet
"What's the matter Colonel Sandurz? Chicken?