Reputation: 13
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
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