3239
Technical User
- May 14, 2003
- 64
Hello everyone,
I have been looking at this code for hours and just can't find the error in it. It is giving me a syntax error in the JOIN operation. The code is below, please help.
Thanks
I have been looking at this code for hours and just can't find the error in it. It is giving me a syntax error in the JOIN operation. The code is below, please help.
Thanks
Code:
DoCmd.RunSQL "INSERT INTO TempAll ( ID, SDate, NAME,Screener, PROVIDER," & _
"MatName, LotID, Quant ) SELECT Dependents.DependentID AS ID, Clients.SDate, Dependents.LNAM & ', ' & Dependents.FNAM & ' ' & Dependents.MNAM AS NAME," & _
"Screener_cds.Screener, Provider_cds.Provider, Material.MatName, Dependents.LotID, " & _
"Dependents.Quant FROM Material RIGHT JOIN (((((Clients LEFT JOIN Provider_cds ON Clients.PROVIDER = Provider_cds.ProvCd) " & _
"LEFT JOIN Screener_cds ON Clients.SCREEN = Screener_cds.ScrnCd) " & _
"ON Clients.ClientID = Dependents.ProxyClientID) ON Material.MatID = Dependents.MatID;"