Link to home
Start Free TrialLog in
Avatar of xsysys
xsysys

asked on

Access ADO error: The multi-part identifier could not be bound

Hi,
  I have a pivot chart in my Access project file. My record souce of the form looks like below:

Select Customer_Id, Customer_Name, Order_Date
FROM  Orders INNER JOIN Customers
On Orders.Customer_Id = Customers.Customer_Id
WHERE Orders.Order_Type = ? AND Customers.Region = ?

It throws the below error:
-------------------------
ADO Error: The multi-part identifier "Orders.Order_Type" could not be bound...
-------------------------

If I have only one where clause, then it works
Select Customer_Id, Customer_Name, Order_Date
FROM  Orders INNER JOIN Customers
On Orders.Customer_Id = Customers.Customer_Id
WHERE Orders.Order_Type = ?

(or)

Select Customer_Id, Customer_Name, Order_Date
FROM  Orders INNER JOIN Customers
On Orders.Customer_Id = Customers.Customer_Id
WHERE Customers.Region = ?

How to solve this?
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xsysys
xsysys

ASKER

I changed my sql as per your feedback. Now it displays the error twice.
 
-----
ADO Error: The multi-part identifier "Orders.Order_Type" could not be bound...
                   The multi-part identifier "Orders.Order_Type" could not be bound...  
-----
in a single message...
 
What to do next?
 
can you please show the relevant code that you use to run the query, please?