IIF statement for multiple Report Titles at runtime

ram_rtg

Registered User.
Local time
Tomorrow, 03:18
Joined
Jun 18, 2015
Messages
47
I have a Report that groups by year so I have a year on each page of the report.
The report pages return records from today onwards.
There is nothing in the Report header.
In the Page header I have placed the title with the year incorporated into the one textbox.
What I'm trying to achieve is a change in title based on year.
If the year is the current year then the title would read
"Minority report for the remainder of CURRENTYEAR"
Otherwise
"Minority report for OTHERYEAR"
The code I have placed in the Title textbox is as follows but is only returning "Minority report for OTHERYEAR" regardless of the year.

Code:
=IIf([Year]<>"Year(now())","Minority report for " & [Year],
 "Minority report for the remainder of " & [Year])

Any ideas what could be wrong with this function statement?
 
You don't want the quotes around this:

"Year(now())"
 

Users who are viewing this thread

Back
Top Bottom