Re: CORRECTED TEST AND ANSWERS.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Richard Jalbert" <richmann@xxxxxxxxxxxx> wrote in message
news:43963a2a.25338187@xxxxxxxxxxxxxxxxxxxxxxxx
> On Mon, 05 Dec 2005 18:47:43 GMT, richmann@xxxxxxxxxxxx (Richard
> Jalbert) wrote:
>
<snipped>

> ---------------------------------------------------------------------
> Create a different one-liner equivalent to this statement
>
> Value = IIf(Len(TextString) > 0, "'" & TextString & "'", "NULL")
>
> ---ANSWER
> Value = Format$(Len(TextString), Trim$(Left$(Join(Split(StrConv( _
> " " & TextString, vbUnicode), Chr$(0)), "\"), _
> 2 * Len(TextString) + 1)) & ";;\N\U\L\L")
>
> ---ANSWER
>

If (Len(TextString) > 0) Then Value = "'" & TextString & _
"'" Else Value =
"NULL"

-ralph <g>


.