Assist IIF conditional in Unbound Text Box Syntax

R

RNUSZ@OKDPS

If the data has the following values:
* LIC_FIRST_NME = Robert
* LIC_MIDDLE_NME = E
* LIC_LAST_NME = Roberts
* LIC_SUBT_TXT = III
* REVO_DATE = 04182005
* LIC_DL_STAY_CDE = S or LIC_DL_STAY_CDE = N

And the Coded Unbound Text box contains
----------------------------------------------------------------------------------------------------
" It is further ordered, pursuant to 47 o.s. §7-206, that the license and
registration(s) of “ & [LIC_FIRST_NME] + “ “ & [LIC_MIDDLE_NME] + “ “ &
[LIC_LAST_NME] & IIf(IsNull([LIC_SUBT_TXT]),â€â€,†“ & [LIC_SUBT_TXT]) & (if
[LIC_DL_STAY_CDE] = “Nâ€, “ shall remain suspended unless said security is
posted and proof of current insurance in your name is filed with this
Department along with a $100.00 reinstatement fee in the form of a cashier’s
check or money order made payable to the Department of Public Safety.†Else
“ are hearby suspended unless said security is posted and proof of current
insurance in your name is filed with this Department before “ &
Format([REVO_DATE],"dd mmmm"", ""yyyy") & “.â€
---------------------------------------------------------------------------------------------------

What I need is the following results: if LIC_DL_STAY_CDE = S, then

--------------------------------------------------------------------------------------------------
†It is further ordered, pursuant to 47 o.s. §7-206, that the license and
registration(s) of Robert E Roberts III shall remain suspended unless said
security is posted and proof of current insurance in your name is filed with
this Department along with a $100.00 reinstatement fee in the form of a
cashier’s check or money order made payable to the Department of Public
Safety
--------------------------------------------------------------------------------------------------

Else if LIC_DL_STAY_CDE = N, then give results of

---------------------------------------------------------------------------------------------------
=†It is further ordered, pursuant to 47 o.s. §7-206, that the license
and registration(s) of Robert E Roberts III are hearby suspended unless said
security is posted and proof of current insurance in your name is filed with
this Department before 18 April 2005
---------------------------------------------------------------------------------------------------

Problem is that each time I code the unbound text box above, I get
syntactical errors that will not let me save the text box. Can someone
assist in the syntax as it would be greatly appreciated.

Much Thanks In Advance.....
 
F

fredg

If the data has the following values:
* LIC_FIRST_NME = Robert
* LIC_MIDDLE_NME = E
* LIC_LAST_NME = Roberts
* LIC_SUBT_TXT = III
* REVO_DATE = 04182005
* LIC_DL_STAY_CDE = S or LIC_DL_STAY_CDE = N

And the Coded Unbound Text box contains:
----------------------------------------------------------------------------------------------------
" It is further ordered, pursuant to 47 o.s. §7-206, that the license and
registration(s) of ´ & [LIC_FIRST_NME] + ´ ´ & [LIC_MIDDLE_NME] + ´ ´ &
[LIC_LAST_NME] & IIf(IsNull([LIC_SUBT_TXT]),¡¡,¡ ´ & [LIC_SUBT_TXT]) & (if
[LIC_DL_STAY_CDE] = ´N¡, ´ shall remain suspended unless said security is
posted and proof of current insurance in your name is filed with this
Department along with a $100.00 reinstatement fee in the form of a cashierÿs
check or money order made payable to the Department of Public Safety.¡ Else
´ are hearby suspended unless said security is posted and proof of current
insurance in your name is filed with this Department before ´ &
Format([REVO_DATE],"dd mmmm"", ""yyyy") & ´.¡
---------------------------------------------------------------------------------------------------

What I need is the following results: if LIC_DL_STAY_CDE = S, then

--------------------------------------------------------------------------------------------------
¡ It is further ordered, pursuant to 47 o.s. §7-206, that the license and
registration(s) of Robert E Roberts III shall remain suspended unless said
security is posted and proof of current insurance in your name is filed with
this Department along with a $100.00 reinstatement fee in the form of a
cashierÿs check or money order made payable to the Department of Public
Safety.
--------------------------------------------------------------------------------------------------

Else if LIC_DL_STAY_CDE = N, then give results of

---------------------------------------------------------------------------------------------------
=¡ It is further ordered, pursuant to 47 o.s. §7-206, that the license
and registration(s) of Robert E Roberts III are hearby suspended unless said
security is posted and proof of current insurance in your name is filed with
this Department before 18 April 2005.
---------------------------------------------------------------------------------------------------

Problem is that each time I code the unbound text box above, I get
syntactical errors that will not let me save the text box. Can someone
assist in the syntax as it would be greatly appreciated.

Much Thanks In Advance.....

You can use an IIf() statement.
="Text here " & IIf([Criteria] = "N","True Text","False Text")

=" It is further ordered, pursuant to 47 o.s. §7-206, that the
license and registration(s) of ´ & [LIC_FIRST_NME] + ´ ´ &
[LIC_MIDDLE_NME] + ´ ´ & [LIC_LAST_NME] &
IIf(IsNull([LIC_SUBT_TXT]),¡¡,¡ ´ & [LIC_SUBT_TXT]) & IIf(
[LIC_DL_STAY_CDE] = ´N¡, ´ shall remain suspended unless said security
is posted and proof of current insurance in your name is filed with
this Department along with a $100.00 reinstatement fee in the form of
a cashierÿs check or money order made payable to the Department of
Public Safety.¡," are hearby suspended unless said security is posted
and proof of current insurance in your name is filed with this
Department before ´ & Format([REVO_DATE],"dd mmmm"", ""yyyy") & ´.¡)

I may have mixed up your N and S statements, but I'm sure you can
straighten them out.
 

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