I need an Access2010 VBA code (64-bit) that will calculate the number of Reworks for a rolling 3month period. I use a DatePicker Form toselect the 3 month reporting period. I tried to do this all with queries butVBA coding maybe the best way to go.
Formula: Rwk = (count of reworks performedon a Program (Pgm)) / (total number of active programs) for a 3 month period.
In my table below, the [RwkCount] (the numerator of the formula) is thetotal count of rework issues found on a Program, e.g., Pgm A there were 3issues documented during the reporting period (Jan, Feb, Mar). There can be more rework counts than programs.I use field [RwkDate], which is not shown, to count the number of Reworks Datesand then summarized the count as [RwkCount].
PgmID PgmName PgmGrp Active Inactive RwkCount 1 A 1 1/22/2015 3 2 B 2 2/2/2015 5 3 C 3 2/3/2015 4/30/2015 14 4 D 3 2/4/2015 9 5 E 1 2/4/2015 2 6 F 2 3/5/2015 4/5/2015 4 7 G 2 3/6/2015 11 8 H 3 3/7/2015 2 9 I 1 4/8/2015 4/30/2015 0 10 J 2 4/9/2015 6 11 K 1 4/11/2015 10 12 L 2 4/12/2015 3
For the denominatorpart of the formula and for this example, the total numbers of active programs is6. The total rework count is 32 for the 6 active programs.
Calculations Needed:
1. Rework for a 3 month period (e.g., Jan,Feb,Mar )= (32/6) = 5.33 reworks for 3 months.
2. Rework for a 12 month period (active+inactive) =69/12 = 5.75 reworks for a 12 month period
My rolling reportingperiods are Jan, Feb, Mar; then Feb, Mar, Apr; then Mar, Apr, May, etc.
Therefore: Ineed a code that will calculate the formula above for a rolling 3 month and 12month reporting period.