Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access report selection

Status
Not open for further replies.

NCH

Programmer
Feb 18, 2003
8
ZA
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.
 
Hi NCH,

There's nothing obviously wrong with your Query and I can make it work so are you sure there is data which should be selected?

Enjoy,
Tony
 
Hi Tony,

I created separate reports for each of them and they work perfectly.

NCH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top