We help IT Professionals succeed at work.

Need help creating a MS Access query using Left Join

pcalabria
pcalabria asked
on
62 Views
Last Modified: 2018-11-04
I need help creating a recordset when two tables are joined with left join.

The following query displays all the records in Parts4Sales and the matching ComponentMaster record ID.  

While I can see records which do not match a record in the ComponentMaster table, because the ID appears as blank, I can not selected them.


Here's my query:

SELECT Parts4Sales.PartID, ComponentMaster.ID
FROM Parts4Sales LEFT JOIN Component Master ON (Parts4Sales.SearchNumber = ComponentMaster.SearchNumber) AND (Parts4Sales.LineID = ComponentMaster.LineID);


My plan is to create a recordset using a query that includes only records without a match in the ComponentMaster table, and then loop through the recordset running code to create a matching ComponentMaster record.

Please help!  THanks
Comment
Watch Question

CERTIFIED EXPERT
Distinguished Expert 2017
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I thought I had tried that before posting... but apparently made a mistake.

Thanks again, as always, Pat!
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
You're welcome:)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.