I like the idea of normalizing my data. So I have set up everything to do that now. All my issues in this post have been fixed, However Now i need to run a Dsum for my NetPositions instead of sum, as it needs to restart the calcs each time there is a new investment, and with respect to the clientID... This is what i currently Have.
Code:
NetPosition: (SELECT SUM(T2.TradePosition)
FROM tblPositions AS T2
WHERE T2.ClientID = T1.ClientID
AND T2.MonthlyDate <= T1.MonthlyDate)
this is what i need:
Code:
NetPosition: (SELECT DSUM(T2.TradePosition, tblPositions, Needs to start for each InvestmentID, and ClientID, following MonthlyDate as order of sum)
FROM tblPositions AS T2
WHERE T2.ClientID = T1.ClientID
AND T2.InvestmentID = T1.InvestmentID
AND T2.MonthlyDate <= T1.MonthlyDate)
I dont know how to write the criteria part..
the query is set up like the union table you made. What this calc does is sums the tradeposition, This is the BegPosition in that query...
Thanks in advance