Hello.
I can't get my dsum function to work in my subform: I'm running a subtotal against a percentage field. I did a test in a reqular query and got the results I wanted but in the real world all I get is a zero where there should be a roll up of the previous rows. I tried putting the function in the control source of the text box and I tried writing a sql statement as part of a recordset but again no results. As a matter of fact, at least i'm getting zeros when I put the function in a text box. If I try to do a procedure with it I just get errors. The SQL statement is different when I take it from the select query to VBA. I'm no sure if its a syntax problem...or.
Can anybody point out how I could adapt these statements or function below to workable VBA Code?
Thanks
Here is the working function when I test it in a select statement:
RunningPayoutBalance: Format(DSum("MaxTierPayout","tbl_curvesourceinput" ,"[Test] <= " & [DupTest] & ""),"Fixed")
Here is the working SQL statement from the select query:
SELECT tbl_CurveSourceInput.Test AS DupTest, Format(DSum("MaxTierPayout","tbl_curvesourceinput" ,"[Test] <= " & [DupTest] & ""),"Fixed") AS RunningPayoutBalance
FROM tbl_CurveSourceInput
GROUP BY tbl_CurveSourceInput.Test;