Link to home
Create AccountLog in
Avatar of jsawicki

asked on

Access Query with Where Clause

I created the code below so when i am comparing these two tables, i retrieve only the results where the email address for a cell phone number is not the same.  This would indicate the number has been reassigned to another user.  

I thought i could just use a where clause indicating the email address in each table not being equal, but i keep receiving a popup to enter data.  

What should my code look like to make this query function properly.  

SELECT New_List.Email_Address, New_List.Cell_Number, Baseline.Cell_Number, Baseline.Email_Address
FROM Baseline RIGHT JOIN New_List ON Baseline.Cell_Number = New_List.Cell_Number
WHERE ((([New].[List].[Email_Address])<>[Baseline].[Email_Address]));

Avatar of pdebaets
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of jsawicki


So i had it right, just a documentation error on my part.  thx
Avatar of Dale Fye
"i keep receiving a popup to enter data"

When you get a popup asking you for a field value that is a pretty good indication that you have listed a field that does not exist somewhere in the query.

As Peter indicates, your syntax:


is not correct, at least not based on the rest of the query.