Mike, I'd like to get this working as, to this point, I've been using a fairly complex and costly subquery as a Counter in my recordsets. I've been toying with your code but instead of the function being called for every record in the query as expected, the function seems to be called once when the query is opened and populates every record with the same number. When I close and open it again, it populates with that number +1. I put a break on the function and, sure enough, the function only gets called once when the query is opened. Every time I've called a function in a query, it gets called for every record; could it be the Static Declaration that is doing this?