is there a way to create a Public Function and use it in a query?
In my query i have the following as one of my columns:
JanSales: Sum(IIf([FiscalYYMM]='0401',[sales],0))
I tried to do the following and got external name not defined:
Any help would be great b/c i use this calculation in alot of queries and when the new year changes i have to go modify every query it's in rather than just in the main function. Any help or any better suggestion for ways to accomplish this would be great.
Thanks in advance.
In my query i have the following as one of my columns:
JanSales: Sum(IIf([FiscalYYMM]='0401',[sales],0))
I tried to do the following and got external name not defined:
Code:
Public Function JanCYRSales() As Double
JanCYRSales = Sum(IIf([FiscalYYMM] = "0401", [sales], 0))
End Function
Any help would be great b/c i use this calculation in alot of queries and when the new year changes i have to go modify every query it's in rather than just in the main function. Any help or any better suggestion for ways to accomplish this would be great.
Thanks in advance.