M
MichaelR
Hi,
I'm trying to put an IIF function into a query in access that will look at
the year and then return either CYA (Current Year Actual) if the year is
2008, PYA (Prior Year Actual) if the year is 2007 or a blank if the year is
2006 or less.
The IF statement that I wrote looks like this:
Period: IIf([CSFYR]=2007,"PYA",IIf([CSFYR]="2008","CYA",Null)).
When I try to run the query, an error message appears that says "Data Type
Mismatch in Criteria Expression."
Any ideas for how I can make this formula work?
Thanks!
Michael
I'm trying to put an IIF function into a query in access that will look at
the year and then return either CYA (Current Year Actual) if the year is
2008, PYA (Prior Year Actual) if the year is 2007 or a blank if the year is
2006 or less.
The IF statement that I wrote looks like this:
Period: IIf([CSFYR]=2007,"PYA",IIf([CSFYR]="2008","CYA",Null)).
When I try to run the query, an error message appears that says "Data Type
Mismatch in Criteria Expression."
Any ideas for how I can make this formula work?
Thanks!
Michael