Query with if

  • Thread starter Edward Jones (Eddie)
  • Start date
E

Edward Jones (Eddie)

I have created a query with a calculated field to compute the inflation from
the current year to the year given from a form. I have it calculating fine
however i want all years in the past till the current year to have an
inflation of 0. how do i add an if statement or condition to a computed
field. Thank you for all your help.
 
E

Edward Jones (Eddie)

Thank you so much. It helps to use the correct syntax. Thank you again.

Dennis said:
=IIf([YourYear] < Year(Now()),0,your current calc)

Edward Jones (Eddie) said:
I have created a query with a calculated field to compute the inflation from
the current year to the year given from a form. I have it calculating fine
however i want all years in the past till the current year to have an
inflation of 0. how do i add an if statement or condition to a computed
field. Thank you for all your help.
 
Top