IIF in a TEXT

G

Guest

Could you please help me add
=IIf([TYPE]="AP",Date()+30,IIf([TYPE]="PO",Date()+60)) to the following Text
Box, where it says CODE HERE. I'm not sure what is missing (" &, or ##)??
I'm trying to add 30 or 60 days to today's date....

------------TEXT BOX -----------
=Trim("Blue Cross Blue Shield of Florida (BCBSF) received your formal
grievance request on " & Format([tr_date_timercvd_hoi],"mmmm d"", ""yyyy") &
". Our time frame for completion of this review is no later than CODE HERE.
Once we have completed our review, you will be notified in writing.")
 
D

Duane Hookom

You are missing the FALSE argument of the second IIf(). What do you want
returned if the TYPE is not AP or PO?
Try something like:
="Blue Cross Blue Shield of Florida (BCBSF) received your formal grievance
request on " & Format([tr_date_timercvd_hoi],"mmmm d"", ""yyyy") & ". Our
time frame for completion of this review is no later than " &
IIf([TYPE]="AP",Date()+30,IIf([TYPE]="PO",Date()+60),"") & ". Once we have
completed our review, you will be notified in writing."
 
G

Guest

Thanks, here is what finally worked:
" & IIf([TYPE]="AP",Date()+30,IIf([TYPE]="PO",Date()+60)) & "



Duane Hookom said:
You are missing the FALSE argument of the second IIf(). What do you want
returned if the TYPE is not AP or PO?
Try something like:
="Blue Cross Blue Shield of Florida (BCBSF) received your formal grievance
request on " & Format([tr_date_timercvd_hoi],"mmmm d"", ""yyyy") & ". Our
time frame for completion of this review is no later than " &
IIf([TYPE]="AP",Date()+30,IIf([TYPE]="PO",Date()+60),"") & ". Once we have
completed our review, you will be notified in writing."

--
Duane Hookom
MS Access MVP

Dan @BCBS said:
Could you please help me add
=IIf([TYPE]="AP",Date()+30,IIf([TYPE]="PO",Date()+60)) to the following
Text
Box, where it says CODE HERE. I'm not sure what is missing (" &, or ##)??
I'm trying to add 30 or 60 days to today's date....

------------TEXT BOX -----------
=Trim("Blue Cross Blue Shield of Florida (BCBSF) received your formal
grievance request on " & Format([tr_date_timercvd_hoi],"mmmm d"", ""yyyy")
&
". Our time frame for completion of this review is no later than CODE
HERE.
Once we have completed our review, you will be notified in writing.")
 
D

Duane Hookom

It works only because Access is nice and doesn't always insist on an
expression if TYPE isn't either AP or PO.

--
Duane Hookom
MS Access MVP

Dan @BCBS said:
Thanks, here is what finally worked:
" & IIf([TYPE]="AP",Date()+30,IIf([TYPE]="PO",Date()+60)) & "



Duane Hookom said:
You are missing the FALSE argument of the second IIf(). What do you want
returned if the TYPE is not AP or PO?
Try something like:
="Blue Cross Blue Shield of Florida (BCBSF) received your formal
grievance
request on " & Format([tr_date_timercvd_hoi],"mmmm d"", ""yyyy") & ". Our
time frame for completion of this review is no later than " &
IIf([TYPE]="AP",Date()+30,IIf([TYPE]="PO",Date()+60),"") & ". Once we
have
completed our review, you will be notified in writing."

--
Duane Hookom
MS Access MVP

Dan @BCBS said:
Could you please help me add
=IIf([TYPE]="AP",Date()+30,IIf([TYPE]="PO",Date()+60)) to the following
Text
Box, where it says CODE HERE. I'm not sure what is missing (" &, or
##)??
I'm trying to add 30 or 60 days to today's date....

------------TEXT BOX -----------
=Trim("Blue Cross Blue Shield of Florida (BCBSF) received your formal
grievance request on " & Format([tr_date_timercvd_hoi],"mmmm d"",
""yyyy")
&
". Our time frame for completion of this review is no later than CODE
HERE.
Once we have completed our review, you will be notified in writing.")
 

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

Top