That would be my guess, but it's just a guess since you provide no clue as to the values returned by what look like two functions (another guess). If there is a way to debug.print the value of DATEFROMPARTS when a given year is passed to it, I'd do that to confirm. I could be all wet - maybe those aren't UDF's but are part of ODBC syntax. I presume you're using this against a non-Access db since Access doesn't support CASE WHEN and you say it worked in the past.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.