By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,235 Members | 1,586 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,235 IT Pros & Developers. It's quick & easy.

DSum for running total to date

P: 11
I'm about to go nuts trying to figure this out...I'm sure it's something pretty basic that I'm missing which will make me more nuts when someone provides the answer!

I'm trying to determine the week where the total paid for a given case reached or surpassed $1000. My query is called "DSUM_PRE" where I'm creating the payment week field. The fields in the query are CASE_ID, PYMT_WK, and PYMT_AMT. The code I'm using is

RUNNING_TTL: DSum("[PYMT_AMT]","DSUM_PRE","[PYMT_WK]<=" & [PYMT_WK])

When I run the query "Running_Ttl" comes back null.

Please help before my laptop or I go flying off the roof...
Jan 29 '15 #1
Share this Question
Share on Google+
3 Replies


jforbes
Expert 100+
P: 1,107
Try:
Expand|Select|Wrap|Line Numbers
  1. DSum("Nz([PYMT_AMT],0)","DSUM_PRE","[PYMT_WK]<=" & [PYMT_WK])
  2.  
Nulls can cause your whole expression to return a Null
Jan 29 '15 #2

P: 11
Now I'm getting #Error...
Jan 29 '15 #3

P: 11
Based on your comment about the null values, I went to my "pre" query and put in a criteria to exclude anything <=0.00 and now I'm getting a $ result....unfortunately it's the same $ amount for all cases...if I had to guess, I would say that it's giving me the grand total for all cases for each case and each payment month...getting closer!
Jan 29 '15 #4

Post your reply

Sign in to post your reply or Sign up for a free account.