In case you have not solved above syntax issue, try doing it in the Query Design Grid.
Just a small thing, by Current Balance, I assume Balance which is available for Issuing :
CurrentBalance = SumofQtyIn + SumQtyReurn - SumQtyIssued;Nz([SumofQtyIn],0)+Nz([SumQtyReturn])-Nz([SumQtyIssued],0) AS CurrentBalance,
SumQtyReurn - Here it should be reflecting the Good Qty Returned ( excluding the Bad Qty Returned ) & not the Total Qty Returned.
Thanks