Link to home
Start Free TrialLog in
Avatar of jsawicki
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]));

Thanks
ASKER CERTIFIED SOLUTION
Avatar of pdebaets
pdebaets
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jsawicki
jsawicki

ASKER

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:

[New].[List].[Email_Address]

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