I have created the following in Access 2007 where I want ALL records from Hospital Addresses listed, whether or not there is a corresponding record in Hospital Contacts. All dropped records have no Hospital Contact record; but, I believe that is what my relationship type covers. Can anyone help? BTW, I did this using Access menus before I understood anything about SQL. Thank you!
Code:
SELECT [Hospital Addresses].[KeyFind #], [Hospital Addresses].Status,
[Hospital Addresses].Type, [Hospital Addresses].[Last Updated], [Hospital
Addresses].[Hospital Name], [Hospital Addresses].Address, [Hospital
Addresses].Zip, [Hospital Addresses].[Mail Address], [Hospital
Addresses].[Mail Zip], [Hospital Addresses].City, [Hospital
Addresses].County, [Hospital Addresses].State, [Hospital Addresses].[Main
Phone #], [Hospital Addresses].[Fax No], [Hospital Addresses].Website,
[Hospital Addresses].Classification, [Hospital Addresses].[Designated
Requestor Facility?], [Hospital Addresses].[Lions Dist], [Hospital
Addresses].OPO, [Hospital Addresses].[OPO Code], [Hospital
Addresses].Comments, [Hospital Contacts].[Contact Type], [Hospital
Contacts].Sal, [Hospital Contacts].FName, [Hospital Contacts].LName,
[Hospital Contacts].Title, [Hospital Contacts].[Contact Phone], [Hospital
Contacts].Ext, [Hospital Contacts].[Contact Email], [Hospital
Contacts].Comments, [HLEB Coordinator Contact Info].[Coordinator Name]
FROM ([HLEB Coordinator Contact Info] RIGHT JOIN [Hospital Addresses] ON
[HLEB Coordinator Contact Info].Branch=[Hospital Addresses].Branch) INNER
JOIN [Hospital Contacts] ON [Hospital Addresses].[KeyFind #]=[Hospital
Contacts].[Keyfind #]
ORDER BY [Hospital Addresses].[Hospital Name];