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
Unable to change the size of the page file
Cannot use Remote Desktop connection on Windows 2000 server
Strip special character function for SQL statement
Assistance with Windows Forms and calendar control embedded inside a grid
Connect to an XP PC with Windows 7
Excel - Copy all Tab data to one master tab automatically
DateTime Group By question
how to round $elling price to nearest fifty cents
How to download computer certificate from certificate authority
Com+ Catalog Error, more security related errors