View Single Post
  #6  
Old April 21st, 2010, 04:18 PM posted to microsoft.public.access.gettingstarted
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Expression using Iif with dates

"Yappy" wrote in message
...
Dirk,
I figured it out. The solution is:

=IIf([Certification Frequency]="Annual",DateAdd("yyyy",1,[Certification
Date]), IIf([Certification
Frequency]="SemiAnnual",DateAdd("m",6,[Certification Date]),
IIf([Certification Frequency]="Quarterly",DateAdd("q",1,[Certification
Date]), IIf([Certification
Frequency]="Monthly",DateAdd("m",1,[Certification
Date])))))


Very good. It looks like I let some spaces creep into the expression I
posted, where they didn't belong, and I may have been short a closing
parenthesis. Good job figuring it out!

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)