Greetings All,

I am having an issues with a bit of code.

I keep getting an Incorrect syntax near 'IC_ProductLots'. As you can see by the code below I use it a few times in this SQL Query. I have tried several modifications and tried some other things I had found on the web, but I am no closer to getting this to work.

The code I am using:

Set rstRecordset = New ADODB.Recordset
rstRecordset.Open _
    Source:="Select IC_ProductLots.ProductKey, IC_ProductLots.LotKey, IC_ProductLots.ProductionDate, IC_ProductLots.OriginalQuantity_Stk, IC_ProductLots.OriginalQuantity_Alt, IC_Products.ProductCode, IC_Products.Description1, IC_Products.ProductSequence, IC_Products.WarehouseCode, (Select IC_ProductCosts.UnitCost WHERE IC_ProductCosts.ProductCostCode = 3) AS Price, ((Select IC_ProductCosts.UnitCost WHERE IC_ProductCosts.ProductCostCode = 3) * IC_ProductLots.OriginalQuantity_Stk) AS Total" & _
        "From IC_ProductLots, IC_Products, IC_ProductCosts" & _
        "Where IC_ProductLots.ProductionDate >= '01/12/2014' AND IC_ProductLots.ProductionDate <='01/13/2014' AND IC_ProductLots.ProductKey = IC_Products.ProductKey AND IC_ProductCosts.ProductCostCode = 3 AND IC_ProductLots.ProductKey = IC_ProductCosts.ProductKey AND IC_ProductLots.ProductKey <> 2088 AND IC_ProductLots.ProductKey <> 741", _
    ActiveConnection:=cnnConnect, _
    CursorType:=adOpenDynamic, _
    LockType:=adLockReadOnly, _
    Options:=adCmdText
Thank you in advance for your assistance.