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

Query Running Sum with no Values

P: 46
I have a query that I am trying to get my employees weekly hours running sum. That way I can seperate the overtime hours and properly calculate profits. I am using a dsum() to add employee time if it is the same week number.

I am not getting any results for Running total.

Expand|Select|Wrap|Line Numbers
  1. Running Total: DSum("[time]","Profit Breakdown 1","[Week] = " & [week number] & " And  DatePart('d', [Date]) <= " & [ddate] & "")
Expand|Select|Wrap|Line Numbers
  1. Week number: Format([date],"ww")
Expand|Select|Wrap|Line Numbers
  1. Week: Format([Date],"ww")
Expand|Select|Wrap|Line Numbers
  1. ddate: DatePart('d',[date])
I am modeling this from this example:
http://support.microsoft.com/kb/290136
Apr 29 '14 #1
Share this Question
Share on Google+
2 Replies


P: 46
Update:

I was able to get it to calculate correct with this

Expand|Select|Wrap|Line Numbers
  1. Running Total: (DSum("[time]","Profit Breakdown 1","[Week] = " & [week number] & " And  DatePart('d', [Date]) <= " & [ddate] & " And [Employee]='" & [Employee1] & "'")/60)
But it only Calculating it for about 1/2 of the entries. I double checked the empty ones to make sure [Employee] and [Employee1], and dates match. The all look ok but still having issues.
Apr 29 '14 #2

P: 46
I have found the issue. I need to run Dsum in a new Query.
Apr 29 '14 #3

Post your reply

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