Solved

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

Posted on 2009-04-05
3
515 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

696 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