Trying to produce an Expiration Date with IF Statement

  • Thread starter Thread starter Debbie
  • Start date Start date
D

Debbie

Well, this is my question. I am using a form and in this form I have a
date of a signed contract (Field Name: Date Signed). What I am trying
to do is an IF OR Otherwise Statement based on
Field Name:Reason has a drop down list with 4 choices (TANF, FS,
Paystubs, Foster Care). The expiration date is based on the choice, for
example
If TANFor FS, then DateAdd("m", +6, [Date Signed]), BUT IF Paystubs or
Foster Care, then DateAdd("yyyy", +1, [Date Signed])
How do I do this formula in a text box to automatically come up with
these expiration dates.
Hope this makes sense.
Help! and Thank you in advance.
 
This is what I was trying to do but it says operand without an operator

=IIf([Reason] = "Paystubs" Or [Reason] = "Foster Care","DateAdd("yyyy",
+1, [Date Signed] ","DateAdd("m", +6, [Date Signed]))
 
You need an extra set of ()

=IIf(([Reason] = "Paystubs" Or [Reason] = "Foster
Care"),"DateAdd("yyyy",
+1, [Date Signed] ","DateAdd("m", +6, [Date Signed]))

Or breaks the logic - everything on either side of it is analysed for
completeness UNLESS you put the two conditions together with ().
 
Thank you! It worked. This group is wonderful. You guys always seem to
have the answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top