Earlier I wrote a VBA function in Excel that takes a Range as input and does some math on it. I'm writing a query in Access right now and trying to do the equivalent with tables... I know you can do SELECT SUM(table.field) AS SumOfField already... how do I write my own method with similar input? Whenever I try it, it seems to be getting passed as a scalar, not a summable list I can for-each over.
EDIT: To clarify, I am trying to write a function like Sum() or StDev() that operates on an entire column. I have found plenty of examples for how to write a function that operates on a single element, but they're not what I need. What gets passed to the function when I type MyStDev(table.field), and how can I use it?
CLOSING EDIT: After further research, it does not appear that Access supports writing your own aggregate functions, despite teasing you with a consistent format for its built-ins. I hate magic functions. I will just export the data into something like excel where I can calculate to my heart's desire.