First, I apologize for my lack of experience up front. That in mind...
I have a report with a subreport that is supposed to show Shipping Order information (on the report) and Items/quantities ordered (on the subreport). Each report is attached to a query and when I run the queries by themselves, the results provide the appropriate information to fill the controls on the reports.
I am passing an OrderID from a FORM to determine which record I will use from the query. If I just generate the report (without the subreport attached) it runs fine. I try to add the subreport and then generate the report and I get a message box prompting for the SMC_ShipOrder_TBL.
I have the Link Child as MainOrderID (from the SMC_ShipOrdrDet_TBL) and the Link Master as SMC_ShipOrder_TBL.OrderID.
The SQL statement for the main report query is:
SELECT SMC_ShipOrder_TBL.*, SMC_Hauler_TBL.*, SMC_Quarry_TBL.*, SMC_Customer_TBL.*, SMC_TaxStatus_TBL.*, SMC_Payment_TBL.*, SMC_ShipOrder_TBL.OrderID, SMC_Payment_TBL_1.*, SMC_TaxStatus_TBL.*
FROM (((SMC_Quarry_TBL INNER JOIN ((SMC_Hauler_TBL INNER JOIN SMC_ShipOrder_TBL ON SMC_Hauler_TBL.HaulerID = SMC_ShipOrder_TBL.HaulerID) INNER JOIN SMC_Customer_TBL ON SMC_ShipOrder_TBL.CustomerID = SMC_Customer_TBL.CustomerID) ON SMC_Quarry_TBL.QuarryID = SMC_ShipOrder_TBL.QuarryID) LEFT JOIN SMC_TaxStatus_TBL ON SMC_ShipOrder_TBL.Taxable = SMC_TaxStatus_TBL.TaxCode) LEFT JOIN SMC_Payment_TBL ON SMC_ShipOrder_TBL.PymntType = SMC_Payment_TBL.PaymentType) LEFT JOIN SMC_Payment_TBL AS SMC_Payment_TBL_1 ON SMC_ShipOrder_TBL.RRPymntType = SMC_Payment_TBL_1.PaymentType
WHERE (((SMC_ShipOrder_TBL.OrderID)=[Forms]![SMC_ShipOrder_FRM]![OrderID]));
And the statement from the subreport query is:
SELECT SMC_ShipOrdrDet_TBL.OrdrDetID, SMC_ShipOrdrDet_TBL.MainOrderID, SMC_ShipOrdrDet_TBL.ProductID, SMC_ShipOrdrDet_TBL.UnitsOrdered, SMC_ShipOrdrDet_TBL.ShippingMethodID, SMC_ShipOrdrDet_TBL.UnitPrice, SMC_Products_TBL.*
FROM SMC_ShipOrdrDet_TBL LEFT JOIN SMC_Products_TBL ON SMC_ShipOrdrDet_TBL.ProductID = SMC_Products_TBL.ProductID
WHERE (((SMC_ShipOrdrDet_TBL.MainOrderID)=[Forms]![SMC_ShipOrder_FRM]![OrderID]));
I've tried many variations based on things I've found in the forums over the last two days, two Access books, two VB books and a SQL book but I'm really stuck now. Any help would be greatly appreciated!
I have a report with a subreport that is supposed to show Shipping Order information (on the report) and Items/quantities ordered (on the subreport). Each report is attached to a query and when I run the queries by themselves, the results provide the appropriate information to fill the controls on the reports.
I am passing an OrderID from a FORM to determine which record I will use from the query. If I just generate the report (without the subreport attached) it runs fine. I try to add the subreport and then generate the report and I get a message box prompting for the SMC_ShipOrder_TBL.
I have the Link Child as MainOrderID (from the SMC_ShipOrdrDet_TBL) and the Link Master as SMC_ShipOrder_TBL.OrderID.
The SQL statement for the main report query is:
SELECT SMC_ShipOrder_TBL.*, SMC_Hauler_TBL.*, SMC_Quarry_TBL.*, SMC_Customer_TBL.*, SMC_TaxStatus_TBL.*, SMC_Payment_TBL.*, SMC_ShipOrder_TBL.OrderID, SMC_Payment_TBL_1.*, SMC_TaxStatus_TBL.*
FROM (((SMC_Quarry_TBL INNER JOIN ((SMC_Hauler_TBL INNER JOIN SMC_ShipOrder_TBL ON SMC_Hauler_TBL.HaulerID = SMC_ShipOrder_TBL.HaulerID) INNER JOIN SMC_Customer_TBL ON SMC_ShipOrder_TBL.CustomerID = SMC_Customer_TBL.CustomerID) ON SMC_Quarry_TBL.QuarryID = SMC_ShipOrder_TBL.QuarryID) LEFT JOIN SMC_TaxStatus_TBL ON SMC_ShipOrder_TBL.Taxable = SMC_TaxStatus_TBL.TaxCode) LEFT JOIN SMC_Payment_TBL ON SMC_ShipOrder_TBL.PymntType = SMC_Payment_TBL.PaymentType) LEFT JOIN SMC_Payment_TBL AS SMC_Payment_TBL_1 ON SMC_ShipOrder_TBL.RRPymntType = SMC_Payment_TBL_1.PaymentType
WHERE (((SMC_ShipOrder_TBL.OrderID)=[Forms]![SMC_ShipOrder_FRM]![OrderID]));
And the statement from the subreport query is:
SELECT SMC_ShipOrdrDet_TBL.OrdrDetID, SMC_ShipOrdrDet_TBL.MainOrderID, SMC_ShipOrdrDet_TBL.ProductID, SMC_ShipOrdrDet_TBL.UnitsOrdered, SMC_ShipOrdrDet_TBL.ShippingMethodID, SMC_ShipOrdrDet_TBL.UnitPrice, SMC_Products_TBL.*
FROM SMC_ShipOrdrDet_TBL LEFT JOIN SMC_Products_TBL ON SMC_ShipOrdrDet_TBL.ProductID = SMC_Products_TBL.ProductID
WHERE (((SMC_ShipOrdrDet_TBL.MainOrderID)=[Forms]![SMC_ShipOrder_FRM]![OrderID]));
I've tried many variations based on things I've found in the forums over the last two days, two Access books, two VB books and a SQL book but I'm really stuck now. Any help would be greatly appreciated!