Hi,
I've got the following record source for a report I'm working on:
SELECT [PRODUCT].[PROD_GRADE], [PRODUCT].[PROD_DESC], [GRN].[GRN_CODE], [GRNLINES].[GRN_PROD_CONV_QTY], [GRNLINES].[GRN_PROD_UNITPRICE], [ORDERS].[ORD_CODE], [ORDERS].[ORD_DATE], [ORDERLINES].[ORD_PROD_WEIGHT], [ORDERLINES].[ORD_PROD_UNITPRICE] FROM (PRODUCT INNER JOIN (GRN INNER JOIN GRNLINES ON [GRN].[GRN_CODE]=[GRNLINES].[GRN_CODE]) ON [PRODUCT].[PROD_GRADE]=[GRNLINES].[PROD_GRADE]) INNER JOIN (ORDERS INNER JOIN ORDERLINES ON [ORDERS].[ORD_CODE]=[ORDERLINES].[ORD_CODE]) ON [PRODUCT].[PROD_GRADE]=[ORDERLINES].[PROD_GRADE] WHERE ((([ORDERS].[ORD_DATE])>=[forms]![frmProfitReportMain]![txtStart] And ([ORDERS].[ORD_DATE])<=[forms]![frmProfitReportMain]![txtEnd])) Or ((([GRN].[GRN_DATE])>=[forms]![frmProfitReportMain]![txtStart] And ([GRN].[GRN_DATE])<=[forms]![frmProfitReportMain]![txtEnd]));
The idea behide the report is to show all the orders and GRN's for a specific date range. The only atb which these two tables have in common is a foreign key for the product code.
I've chop and changed the selection untill a point where no errors were generated, but still no records are selected. How can I change the selection to select records?
Thanks.
I've got the following record source for a report I'm working on:
SELECT [PRODUCT].[PROD_GRADE], [PRODUCT].[PROD_DESC], [GRN].[GRN_CODE], [GRNLINES].[GRN_PROD_CONV_QTY], [GRNLINES].[GRN_PROD_UNITPRICE], [ORDERS].[ORD_CODE], [ORDERS].[ORD_DATE], [ORDERLINES].[ORD_PROD_WEIGHT], [ORDERLINES].[ORD_PROD_UNITPRICE] FROM (PRODUCT INNER JOIN (GRN INNER JOIN GRNLINES ON [GRN].[GRN_CODE]=[GRNLINES].[GRN_CODE]) ON [PRODUCT].[PROD_GRADE]=[GRNLINES].[PROD_GRADE]) INNER JOIN (ORDERS INNER JOIN ORDERLINES ON [ORDERS].[ORD_CODE]=[ORDERLINES].[ORD_CODE]) ON [PRODUCT].[PROD_GRADE]=[ORDERLINES].[PROD_GRADE] WHERE ((([ORDERS].[ORD_DATE])>=[forms]![frmProfitReportMain]![txtStart] And ([ORDERS].[ORD_DATE])<=[forms]![frmProfitReportMain]![txtEnd])) Or ((([GRN].[GRN_DATE])>=[forms]![frmProfitReportMain]![txtStart] And ([GRN].[GRN_DATE])<=[forms]![frmProfitReportMain]![txtEnd]));
The idea behide the report is to show all the orders and GRN's for a specific date range. The only atb which these two tables have in common is a foreign key for the product code.
I've chop and changed the selection untill a point where no errors were generated, but still no records are selected. How can I change the selection to select records?
Thanks.