Query - left join, rt join...


I have a form with various fields from tblLetterofCredit.
It is joined to tblBanks_Participating on tblLetterOfCredit.LetterOfCreditID = tblBanks_Participating.LCID;

Not all tblLetterOfCredit records will have a tblBanks_Participating on the key
The form will not display the record from tblLetterOfCredit if tblBanksParicipating does not have a record. Meaning that my record in tblLetterOfCredit will not be displayed.
I only have this issue if there is no matchiing record in tblBanks_Participating.
I need to show ALL records from tblLetterOfCredit and matches on tblBanks_Participating but if there is no match on tblBanks_Participating then still show that one on tblLetterOfCredit.

How can I avoid this?
I thought I could use a LEFT JOIN from tblLetterOfCredit and it will show all records even if there is not a match for tblBanks_participating.
I imagine there is some kind of trick to this.

Thank you.

Here is the SQL:
SELECT tblLetterOfCredit.ProjectID, tblLetterOfCredit.Amount, tblLetterOfCredit.LCNo, tblLetterOfCredit.LCType, tblLetterOfCredit.Currency, tblLetterOfCredit.InitialExpireDate, tblLetterOfCredit.DateOfIssueSB, tblLetterOfCredit.FinalMaturity, tblLetterOfCredit.EndUserID, tblLetterOfCredit.ValidUntil, tblLetterOfCredit.CSMNo, tblBanks_Participating.BankID, tblBanks_Participating.BankType

FROM tblLetterOfCredit LEFT JOIN tblBanks_Participating ON tblLetterOfCredit.LetterOfCreditID = tblBanks_Participating.LCID;
pdvsaProject financeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

<I thought I could use a LEFT JOIN from tblLetterOfCredit and it will show all records even if there is not a match for tblBanks_participating

The LEFT JOIN in your query should make it behave as you have described.

Is there something else at work here, such as Form Filtering?

What is the actual recordsource of your form?  Is it this query, or is it something else that is based on this query?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Guy Hengel [angelIII / a3]Billing EngineerCommented:
left join will do that...
but you need to make sure you don't have any other criteria on the left joined table ...
pdvsaProject financeAuthor Commented:
I am thinking I had some kind of corruption because it is working now.  

thank you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.