kahmed1985
New member
- Local time
- Today, 13:18
- Joined
- Jan 9, 2013
- Messages
- 5
Hi, I am trying to produce a field in a query that gives the running total, but then resets if there is a zero.
So for the table below, i would like to produce the field Wins in a Row
Date- Team- Win- Wins in a Row
29-Oct-06- Liverpool- 1- 1
12-Nov-06- Manchester- 1- 1
19-Nov-06- Liverpool- 1- 2
26-Nov-06- Manchester- 0- 0
03-Dec-06- Manchester- 1- 1
10-Dec-06- Liverpool- 0- 0
17-Dec-06- Manchester- 1- 2
24-Dec-06- Liverpool- 1- 1
07-Jan-07- Liverpool- 1- 2
14-Oct-07- Liverpool- 1- 3
I can manage to get a running total but am struggling with the reset. Any ideas would be really helpful, many thanks
So for the table below, i would like to produce the field Wins in a Row
Date- Team- Win- Wins in a Row
29-Oct-06- Liverpool- 1- 1
12-Nov-06- Manchester- 1- 1
19-Nov-06- Liverpool- 1- 2
26-Nov-06- Manchester- 0- 0
03-Dec-06- Manchester- 1- 1
10-Dec-06- Liverpool- 0- 0
17-Dec-06- Manchester- 1- 2
24-Dec-06- Liverpool- 1- 1
07-Jan-07- Liverpool- 1- 2
14-Oct-07- Liverpool- 1- 3
I can manage to get a running total but am struggling with the reset. Any ideas would be really helpful, many thanks