Sabtu, 07 Juli 2018

[MS_AccessPros] Re: Nested IIF statement

 

UserState: Left(Trim(
IIf([Temp10] Like "*NEW USER'S REGION*",
  Trim(Replace([Temp10],"NEW USER'S REGION:","")),
IIf([Temp9] Like "*NEW USER'S LOCATION INFO: USA-FRA*",
  Replace([Temp9],"NEW USER'S LOCATION INFO: USA-FRA>>","")),
IIf([Temp9] Like "*NEW USER'S LOCATION INFO: USA-FRAC-FRA*",
  Replace([Temp9],"NEW USER'S LOCATION INFO: USA-FRAC-FRA>>","")

There is no length shown for LEFT and no closing bracket for it. If you want to trim only the leading spaces, delete LEFT and change TRIM to LTRIM.

The 'if not' fields of the IIf's are missing.

The REPLACE function does its own looking for text to be replaced, so you don't need IIF and LIKE.

I suggest:
LTrim(Replace([Temp10],"NEW USER'S REGION:",""))
LTrim(Replace([Temp9],"NEW USER'S LOCATION INFO: USA-FRA>>",""))
LTrim(Replace([Temp9],"NEW USER'S LOCATION INFO: USA-FRAC-FRA>>",""))

--

Dave W


__._,_.___

Posted by: Dave Williams <davewillgmale@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (7)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


SPONSORED LINKS
.

__,_._,___

Tidak ada komentar:

Posting Komentar