Hi, I have a little issue with a running sum in a query.
The following fields are involved: WorkDate (date field), HoursPaid (number field), TISort (a time field), StaffFK (an AutoID number field). Data source is the query: qryPayPeriodSummary
I want a running total to have a running total of WorkHours for each StaffFK. It has to be sorted by ascending WorkDate and then ascending TISort. There are duplicats in WorkDate and duplicates in TISort for each StaffFK, but no duplicate WorkDate and TISort combinations for a particular StaffFK. Here is my DSum formula, it does the running sum but not in the correct order.
This is what I have so far:
RunningTotal: DSum("[HoursPaid]","[qryPayPeriodSummary]","[StaffFK]=" & [StaffFK] & " AND [WorkDate] <= #" & [WorkDate] & "# And [TISort] <= #" & [TISort] & "# ")