In a straight forward query, it will be specifically what you write it to do, and it will get complicated fast. You will have to manually rewite the queries when you want to change the number of lagging months.
You could use subqueries, each one providing one month's data, lagged by different amounts, and then assemble them together as one. Lot's a queries, though, could be a performance hit and a pain to maintain.
1) If you follow the SQL model Teddy proposed, you could write a VB routine that assembles the SQL statement for you and then run the query.
2) You could pull the data into a recordset and use code to assemble the data you want (this is one of those cases where an unbound recordset would be handy). Since Access doesn't let you use unbound recordsets, you've have to use a temp table, or simply add text to a text box.
The first method is easier to code, but could end up making a very slow query if you have a lot of data or a slow network,
The second method is a lot more efficient in that it pulls the data once, processes it locally and the gives the result, but will be more coding.