P
Phil Smith
I have a query that was based on a table. I recreated the structure of
that table as a query, gave it that tables name. So now, without
changing it, I now have a query based on a query.
Now, If I try to edit that query, it refuses to open it in the Query
grid, producing the following error:
The specified field '[customer_id]' could refer to more thatn one table
listed in the FROMclause of your SQL statement.
Now, maybe I am blind, but every single reference I can see to
'[customer_id]' is preferenced with the table name.
Any Ideas?
SELECT [Report Card ItemType Padding].customer_id, [Report Card ItemType
Padding].item_types_name, Sum(IIf([Unionized Data
Table]!invoice_date>=Forms![Report Card Form]!Start And [Unionized Data
Table]!invoice_date<=Forms![Report Card Form]!End,[Unionized Data
Table]!Ext_Price,0)) AS Period1, Sum(IIf([Unionized Data
Table]!invoice_date>=Forms![Report Card Form]!SecStart And [Unionized
Data Table]!invoice_date<=Forms![Report Card Form]!SecStop,[Unionized
Data Table]!Ext_Price,0)) AS [Period 2], CDbl([Report Card ItemType
Padding]!customer_id) AS Customer_no
FROM [Report Card ItemType Padding] LEFT JOIN [Unionized Data Table] ON
([Report Card ItemType Padding].item_types_name=[Unionized Data
Table].item_types_name) AND ([Report Card ItemType
Padding].customer_id=[Unionized Data Table].customer_id)
GROUP BY [Report Card ItemType Padding].customer_id, [Report Card
ItemType Padding].item_types_name, CDbl([Report Card ItemType
Padding]!customer_id)
HAVING ((([Report Card ItemType Padding].customer_id)=Forms![Report Card
Form]!CustomerCombo))
ORDER BY [Report Card ItemType Padding].customer_id, [Report Card
ItemType Padding].item_types_name;
that table as a query, gave it that tables name. So now, without
changing it, I now have a query based on a query.
Now, If I try to edit that query, it refuses to open it in the Query
grid, producing the following error:
The specified field '[customer_id]' could refer to more thatn one table
listed in the FROMclause of your SQL statement.
Now, maybe I am blind, but every single reference I can see to
'[customer_id]' is preferenced with the table name.
Any Ideas?
SELECT [Report Card ItemType Padding].customer_id, [Report Card ItemType
Padding].item_types_name, Sum(IIf([Unionized Data
Table]!invoice_date>=Forms![Report Card Form]!Start And [Unionized Data
Table]!invoice_date<=Forms![Report Card Form]!End,[Unionized Data
Table]!Ext_Price,0)) AS Period1, Sum(IIf([Unionized Data
Table]!invoice_date>=Forms![Report Card Form]!SecStart And [Unionized
Data Table]!invoice_date<=Forms![Report Card Form]!SecStop,[Unionized
Data Table]!Ext_Price,0)) AS [Period 2], CDbl([Report Card ItemType
Padding]!customer_id) AS Customer_no
FROM [Report Card ItemType Padding] LEFT JOIN [Unionized Data Table] ON
([Report Card ItemType Padding].item_types_name=[Unionized Data
Table].item_types_name) AND ([Report Card ItemType
Padding].customer_id=[Unionized Data Table].customer_id)
GROUP BY [Report Card ItemType Padding].customer_id, [Report Card
ItemType Padding].item_types_name, CDbl([Report Card ItemType
Padding]!customer_id)
HAVING ((([Report Card ItemType Padding].customer_id)=Forms![Report Card
Form]!CustomerCombo))
ORDER BY [Report Card ItemType Padding].customer_id, [Report Card
ItemType Padding].item_types_name;