Counting Records in Query

A

Alan Nicoll

I need an incrementing count of the number of shifts where
an employee has overtime. This is the query I came up
with:

WOTCount: DCount("[Name]","Decoded_Data","[Name] = '" &
[Name] & "' AND [WeekOT]>0")

The result I want is like this:

Name WeekOK WOTCount
A 0 0
A 0 0
A 4 1
A 6 2
A 10 3
B 0 0
B 4 1

And so on. What I get from my query is all zeros in the
WOTCount field.

Alan Nicoll
 
Top