If I define a Public Function in an Access VBA module, then I can use that function to manipulate fields that are selected in a SELECT statement. I wonder if I can define such a function to be used as an aggregate user function (i.e. similar to SUM, AVERAGE)
The idea is the following: suppose I have table which for several project contains fields (CashFlowDate, Amount) that describe the cashflow related to that project. If I could define a user function XIRR then I could in a single statement calculate the XIRR for several project as:
SELECT ProjectName, XIRR(CashFlowDate, Amount) as IRR
FROM tblProjects
GROUP by ProjectName
Probably wishfull thinking?