Solved

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

Posted on 2009-04-05
3
516 Views
Last Modified: 2012-05-06
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?
0
Comment
Question by:xsysys
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 125 total points
ID: 24074603
try this:
Select Customer_Id, Customer_Name, Order_Date 
FROM  Orders INNER JOIN Customers 
On ( Orders.Customer_Id = Customers.Customer_Id AND Customers.Region = ? )
WHERE ( Orders.Order_Type = ?  )

Open in new window

0
 

Author Comment

by:xsysys
ID: 24074696
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?
 
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 24074820
can you please show the relevant code that you use to run the query, please?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question