Hi All
I am trying to use the switch function in a query.
The function I have created is:
Where SumofJan and SumofFeb are fields in the query.
"the expression you entered contains invalid sysntax,or you need to enclose your text data in quotes"
Is it possible to use the switch function the way I am attempting, and if so, what is the issue with my syntax?
Really appreciate your assistance.
I am trying to use the switch function in a query.
The function I have created is:
YTDBud: Switch(Month(Date())=1,[sumofJan]),(Month(Date()) =2,[sumofJan]+[SumofFeb]
Where SumofJan and SumofFeb are fields in the query.
YTDBud: Switch(Month(Date())=1
returns the correct value for SumofJan but when I add the second expression I get an error message "the expression you entered contains invalid sysntax,or you need to enclose your text data in quotes"
Is it possible to use the switch function the way I am attempting, and if so, what is the issue with my syntax?
Really appreciate your assistance.