Coding 30 day average

  • Thread starter Thread starter gemini2
  • Start date Start date
G

gemini2

I hope someone can help me. I need to create a text box on a for
that will display a running 30-day average of a field. How would
code this so that each day the maximum number of days it use t
calculate the average is 30. :?
 
you could try using a DSum() function, where the criteria selects records
based on a date field in each record, something like

=DSum("[NumberField]", "MyTable", "[DateField] Between #" & Date() & "# And
#" & Date()-30 & "#") / 30

hth
 
Back
Top