user3766854
user3766854

Reputation: 13

Need helping making a multi table query in access

This is the SQL code I have at the moment, what can I do to fix it because when I try to run it it says Type Mismatch in expression

SELECT tblCustomers.CustomerID, tblCustomers.Lastname, tblCustomers.Firstname,      
       tblCustomers.AddressLine1, tblCustomers.Phone, tblOrders.OrderID, 
       tblOrders.CustomerID, tblOrders.NumberOfCDs, tblOrders.OrderDate,  
       tblOrders.PaymentType, tblOrders.AmountPaid, tblOrders.Discount, tblOrders.OrderSent
FROM tblCustomers 
INNER JOIN tblOrders ON tblCustomers.CustomerID = tblOrders.CustomerID;

P.S: I have just started to learn to use access so forgive my 'Noobyness' for lack of a better word.

Upvotes: 0

Views: 30

Answers (1)

Mzf
Mzf

Reputation: 5260

You can't compare apples to oranges.

Meaning, when you compare 2 things, they need to be of the samee type.

Here tblCustomers.CustomerID = tblOrders.CustomerID you compare 2 things - make sure that they have the same type.

Read this , get db schema for both table and compare CustomerID on both.

Upvotes: 1

Related Questions