If statement in MS Access Expression Builder on Control Source

1.7k Views Asked by At

I have an unbound textbox on my form I put on the control source =Date()-[boundfield] and it works fine it gives the number of days I needed but I wanted to have an If statement in this unbound field so using the expression builder I typed on the Control Source.

 =iff(Date()-[boundfield] > 120, "Max","not max")

But the unbound field always display #Name?. What might be the error on my code?.

1

There are 1 best solutions below

1
On BEST ANSWER

=IIf((Date()-[Adate])>120,"P","N")

This should work, put brackets as like this