Microsoft
Software
Hardware
Network
Question : MS Access calculate rolling 12 month average
In an Access query how do I calculate a rolling 12 month average for a field that contains numerical data such as 1, 2, 3. The fields are Date (month/year), number of injuries, and the 3rd column will contain a rolling 12 month average for the past 12 months.
Answer : MS Access calculate rolling 12 month average
Use a criterium like:
where [YourDateField] between DateAdd("yyyy", -1, Date()) and Date()
If [YourDateField] is not of data type Date you will have to convert it to a valid date value using DateValue or DateSerial.
/gustav
Random Solutions
Can I read the stdout from a Shell() call back into VBA?
can not add windows xp drivers into server 2008
Loop thru controls in from header
Access SQL If .. Else
How do I get MsAccess to include commas as part of the text and not a delimiter when exportig with GetString?
Windows 2008 Terminal Services
Sql Server username and password for windows authentication mode
Base Subform on Combo ID
Make web service test form available on remote machine?
Pass through authentication for domain users in IIS 6.0