I am trying to get a report to show a list acquisitions for a particular product between two dates i have set up a query and a form and a report.
The SQL for the query is as follows
SELECT tblAcq.Log_In_ID, tblAcqDetail.Product_ID, tblAcq.Log_Date, tblProducts.Product_Name, tblProducts.Unit_Price, tblProducts.QuantityProd, tblAcq.Log_Note
FROM tblAcq INNER JOIN (tblProducts INNER JOIN tblAcqDetail ON tblProducts.Product_ID = tblAcqDetail.Product_ID) ON tblAcq.Log_In_ID = tblAcqDetail.Log_In_ID
WHERE (((tblAcqDetail.Product_ID)=[Forms]![FrmAcquisitionReport]![CboProduct]) AND ((tblAcq.Log_Date) Between [Forms]![FrmAcquisitionReport]![Begin] And [Forms]![FrmAcquisitionReport]![End])) OR (((tblAcq.Log_Date) Between [Forms]![FrmAcquisitionReport]![Begin] And [Forms]![FrmAcquisitionReport]![End]) AND (([Forms]![FrmAcquisitionReport]![CboProduct])=0));
Ultimatly i am trying to get the report to be produced when the dates and the product are entered on the form. Maybe my sql is wrong as it keeps coming up with the message that the exspression is too complicated. Can anyone help?:
The SQL for the query is as follows
SELECT tblAcq.Log_In_ID, tblAcqDetail.Product_ID, tblAcq.Log_Date, tblProducts.Product_Name, tblProducts.Unit_Price, tblProducts.QuantityProd, tblAcq.Log_Note
FROM tblAcq INNER JOIN (tblProducts INNER JOIN tblAcqDetail ON tblProducts.Product_ID = tblAcqDetail.Product_ID) ON tblAcq.Log_In_ID = tblAcqDetail.Log_In_ID
WHERE (((tblAcqDetail.Product_ID)=[Forms]![FrmAcquisitionReport]![CboProduct]) AND ((tblAcq.Log_Date) Between [Forms]![FrmAcquisitionReport]![Begin] And [Forms]![FrmAcquisitionReport]![End])) OR (((tblAcq.Log_Date) Between [Forms]![FrmAcquisitionReport]![Begin] And [Forms]![FrmAcquisitionReport]![End]) AND (([Forms]![FrmAcquisitionReport]![CboProduct])=0));
Ultimatly i am trying to get the report to be produced when the dates and the product are entered on the form. Maybe my sql is wrong as it keeps coming up with the message that the exspression is too complicated. Can anyone help?: