Solved

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

Posted on 2009-04-05
3
510 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
  • 2
3 Comments
 
LVL 142

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 142

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now