I'm attempting to do a complex DSum calculation to be used on a summary form. What i'm attempting to do is Sum the balance field of an existing table, however the balance has a sign indicator field (Cur-Bal-S) which is a text field that is either null or "-" for negative. Naturally, the equation that needs to happen is as follows:
[Cur-Bal] * iif([Cur-Bal-S]="-",-1,1)
This equation works perfectly in queries and other applications, however when i try to integrate it into the DSum, i get a Type Mismatch error. The code I'm trying to use is as follows:
?DSum("[Cur-Bal] * iif([Cur-Bal-S]="-",-1,1)","[CL - Month End Data]")
This returns Run-time Error '13'. Type Mismatch.
Any insight?
Thanks, Guy
[Cur-Bal] * iif([Cur-Bal-S]="-",-1,1)
This equation works perfectly in queries and other applications, however when i try to integrate it into the DSum, i get a Type Mismatch error. The code I'm trying to use is as follows:
?DSum("[Cur-Bal] * iif([Cur-Bal-S]="-",-1,1)","[CL - Month End Data]")
This returns Run-time Error '13'. Type Mismatch.
Any insight?
Thanks, Guy