T
tbrogdon
I have an unbound form frmProdReview with an OK command button set to
OpenQuery and a Cancel command button. On the form I have 3 controls
txtDate, cboShift, and cboDept.
When I click the "OK" button the query runs. It returns a datasheet
that contains no data only the field names I have requested. Below is
the SQL. Any ideas?
Thanks,
Tim
PARAMETERS forms![frmProdReview]![txtDate] Short, forms!
[frmProdReview]![cboDept] Text ( 255 ), forms![frmProdReview]!
[cboDept] Text ( 255 );
SELECT DISTINCTROW ProductOperation.ProductionID,
Production.ProductionDate, Department.Department, Shift.Shift,
Workstation.WorkstationName, Parts.PartID, ProductOperation.Operator1,
ProductOperation.Operator2, ProductOperation.QuantityRun
FROM Shift INNER JOIN (((Department INNER JOIN Production ON
Department.Department=Production.Department) INNER JOIN Workstation ON
Department.Department=Workstation.Department) INNER JOIN (Parts INNER
JOIN ProductOperation ON Parts.PartID=ProductOperation.PartID) ON
(Workstation.WorkstationID=ProductOperation.WorkstationID) AND
(Production.ProductionID=ProductOperation.ProductionID)) ON
Shift.Shift=Production.Shift
WHERE (((Production.ProductionDate)=Forms!frmProdReview!txtDate) And
((Department.Department)=Forms!frmProdReview!cboDept) And
((Shift.Shift)=Forms!frmProdReview!cboShift));
OpenQuery and a Cancel command button. On the form I have 3 controls
txtDate, cboShift, and cboDept.
When I click the "OK" button the query runs. It returns a datasheet
that contains no data only the field names I have requested. Below is
the SQL. Any ideas?
Thanks,
Tim
PARAMETERS forms![frmProdReview]![txtDate] Short, forms!
[frmProdReview]![cboDept] Text ( 255 ), forms![frmProdReview]!
[cboDept] Text ( 255 );
SELECT DISTINCTROW ProductOperation.ProductionID,
Production.ProductionDate, Department.Department, Shift.Shift,
Workstation.WorkstationName, Parts.PartID, ProductOperation.Operator1,
ProductOperation.Operator2, ProductOperation.QuantityRun
FROM Shift INNER JOIN (((Department INNER JOIN Production ON
Department.Department=Production.Department) INNER JOIN Workstation ON
Department.Department=Workstation.Department) INNER JOIN (Parts INNER
JOIN ProductOperation ON Parts.PartID=ProductOperation.PartID) ON
(Workstation.WorkstationID=ProductOperation.WorkstationID) AND
(Production.ProductionID=ProductOperation.ProductionID)) ON
Shift.Shift=Production.Shift
WHERE (((Production.ProductionDate)=Forms!frmProdReview!txtDate) And
((Department.Department)=Forms!frmProdReview!cboDept) And
((Shift.Shift)=Forms!frmProdReview!cboShift));