I'm having trouble forming a multiple condition IF statement.
Basically, I have 2 radio buttons with values of "option 1" = 1 and "option 2" = 2 which values are stored in field [CPR_option]... then I have 2 date/time text boxes "CPR_date" and "CPR_date_expires".
I am trying to write a statement to place in "CPR_date_expires" that says: if CPR_option = 1 then add 2 years to "CPR_date", else if CPR_option = 2, add 1 year to "CPR_date", and if nothing is selected (value 0) then don't calculate anything. I'm not sure if you have to specify the don't calculate (null) function.
This is what I have so far... but it's not working - pretty sure my syntax is wrong:
=IIf([CPR_option]="1",DateAdd("m",24,[CPR_Date_Issue]), ([CPR_option]="2",DateAdd("m",12,[CPR_Date_Issue]))
Help?
Basically, I have 2 radio buttons with values of "option 1" = 1 and "option 2" = 2 which values are stored in field [CPR_option]... then I have 2 date/time text boxes "CPR_date" and "CPR_date_expires".
I am trying to write a statement to place in "CPR_date_expires" that says: if CPR_option = 1 then add 2 years to "CPR_date", else if CPR_option = 2, add 1 year to "CPR_date", and if nothing is selected (value 0) then don't calculate anything. I'm not sure if you have to specify the don't calculate (null) function.
This is what I have so far... but it's not working - pretty sure my syntax is wrong:
=IIf([CPR_option]="1",DateAdd("m",24,[CPR_Date_Issue]), ([CPR_option]="2",DateAdd("m",12,[CPR_Date_Issue]))
Help?
