Bryan Carbonnell
carbonnb at gmail.com
Fri Mar 23 13:34:25 CDT 2012
Hey guys I need help! It's been about 3 years since I have touched Access and can't recall how to build a specific query. Here is what I have: tblUsers ------------ ID - Autogenerated PK LastName FirstName ..... tblPhoneBook -------------------- ID - Autogenerated PK LastName FirstName Location What I need is a query that will give me EVERYONE from tblUsers and the matching records from tblPhoneBook. The only fields that are common are the LastName and FirstName fields. This is the SQL that I've got and it's not working correctly, or at least not to me anyway SELECT tblUsers.*, tblPhoneBook.[LastName], PhoneBook.[FirstName], PhoneBook.Location FROM tblUsers LEFT JOIN PhoneBook ON (tblUsers.FirstName = PhoneBook.[FirstName]) AND (tblUsers.LastName = PhoneBook.[LastName]) ORDER BY tblUsers.LastName; tblUsers has 987 records and the query is returning 993 records and I can't for the life of me figure it out. These tables were actually Excel Spreadsheets that were imported into Access. Help!! Please?!?! -- Bryan Carbonnell - carbonnb at gmail.com Life's journey is not to arrive at the grave safely in a well preserved body, but rather to skid in sideways, totally worn out, shouting "What a great ride!"