specified field could refer to more than one table listed in the FROM clause

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lizfbolt
    New Member
    • Jul 2013
    • 1

    #1

    specified field could refer to more than one table listed in the FROM clause

    I am creating a report in access 2010 based on a query.
    this is my first year in access, any help is much appreciated!!!!

    Here is the SQL from my query (I have no issues running the query)

    Code:
    PARAMETERS [Date Range] Text ( 255 );
    SELECT Vendor.VendorName, [Frame].[Frame], Frame.DNR, Frame.Discontinued, BuyingReport_GroupSOSummary.SumOfRetail, BuyingReport_GroupSOSummary.SumOfLandedCost, BuyingReport_GroupStockSummary.SumOfRetail, BuyingReport_GroupStockSummary.SumOfLandedCost, [BuyingReport_GroupSOSummary]![SumOfRetail]+[BuyingReport_GroupStockSummary]![SumOfRetail] AS NetRetail, [BuyingReport_GroupSOSummary]![SumOfLandedCost]+[BuyingReport_GroupStockSummary]![SumOfLandedCost] AS NetLanded, ([NetRetail]-[NetLanded])/[NetRetail] AS Margin, [Date Range] AS DateRange
    FROM Vendor INNER JOIN (Alias INNER JOIN (BuyingReport_GroupSOSummary RIGHT JOIN (BuyingReport_GroupStockSummary RIGHT JOIN Frame ON BuyingReport_GroupStockSummary.Frame = [Frame].Frame) ON BuyingReport_GroupSOSummary.Frame = [Frame].Frame) ON Alias.ID = Frame.Vendor) ON Vendor.ID = Alias.Vendor
    WHERE (((Frame.Discontinued)=False));
    Here is the SQL from my report (it tells me: The Specified field 'Frame.Frame' could refer to more than one table listed in the FROM clause of your SQL statement.)

    Code:
    PARAMETERS [Date Range] Text ( 255 );
    SELECT Vendor.VendorName, [Frame].[Frame], Frame.DNR, Frame.Discontinued, BuyingReport_GroupSOSummary.SumOfRetail, BuyingReport_GroupSOSummary.SumOfLandedCost, BuyingReport_GroupStockSummary.SumOfRetail, BuyingReport_GroupStockSummary.SumOfLandedCost, [BuyingReport_GroupSOSummary]![SumOfRetail]+[BuyingReport_GroupStockSummary]![SumOfRetail] AS NetRetail, [BuyingReport_GroupSOSummary]![SumOfLandedCost]+[BuyingReport_GroupStockSummary]![SumOfLandedCost] AS NetLanded, ([NetRetail]-[NetLanded])/[NetRetail] AS Margin, [Date Range] AS DateRange
    FROM Vendor INNER JOIN (Alias INNER JOIN (BuyingReport_GroupSOSummary RIGHT JOIN (BuyingReport_GroupStockSummary RIGHT JOIN Frame ON BuyingReport_GroupStockSummary.Frame = [Frame].Frame) ON BuyingReport_GroupSOSummary.Frame = [Frame].Frame) ON Alias.ID = Frame.Vendor) ON Vendor.ID = Alias.Vendor
    WHERE (((Frame.Discontinued)=False));
    Last edited by Rabbit; Jul 17 '13, 07:23 PM. Reason: Please use code tags when posting code.
Working...