T
TC
Answered at bottom.
Your SQL looks ok.
Your code also looks ok , assuming that:
Query = (The statement I types above)
actually means:
dim Query as string
Query = "SELECT ... etc."
So, post your >exact< code - copied & pasted exactly.
Also, what is the error you're gettng? There are 50 gazillion possible
errors. >You< know what message you're getting; we do not.
HTH,
TC
James B. said:Hi all,
How can I get the informations from multi-tables using
DAO.
I have three tables:
Customer:
CustomerID
CustomerName
customerAddress
OrderProduct
CustomerID
ProductID
Product
ProductID
ProductName
What I need to do is to get the the product the customer
order. With that in mind, I created a query:
SELECT CustomerName,CustomerAddress,ProductName FROM
Customer,OrderProduct,Product WHERE Customer.CustomerID =
OrderProduct.CustomerID AND OrderProduct.ProductID =
Product.ProductID
Somehow when I add the query to the code, I'm getting
errors.
The code is:
Dim rd as DAO.Database
Dim rst as DAO.Recordset
Query=(The statement I typed above)
set rd=Currentdb()
set rst=rd.Openrecordset(Query) //Here is what I'm having
trouble. I keep getting an error. I'm trying to get the
information from multi-table using DAO. Is this possible
to be done? How? What do I need to do to make the
code/query work?
Any help is highly appreciated,
J.B.
Your SQL looks ok.
Your code also looks ok , assuming that:
Query = (The statement I types above)
actually means:
dim Query as string
Query = "SELECT ... etc."
So, post your >exact< code - copied & pasted exactly.
Also, what is the error you're gettng? There are 50 gazillion possible
errors. >You< know what message you're getting; we do not.
HTH,
TC