CONTACT US: 778-373-4422 |

Photo by Prateek Katyal from Pexels

How to Simulate Lag and Lead Window Functions in MS Access

Have you ever wondered how you could calculate something in your query field that used the value in the row previous to the current row? Like when something changes status and you want to know how long it was in the previous status? This is where Lag and Lead window functions come in, and these are regularly used in larger RDBMS systems like SQL Server or Oracle. While MS Access does not have native Lag and Lead functions, we can simulate two of the most commonly used ones (Lag and Lead by one record) by using several methods.

Need MS Access Database Support? Contact me today!