Hello Everyone!
We're working with three fields: FirstName,MiddleName, and LastName
We're trying to get the following output:
If the value in FirstName is null, then we would like to simply give us the value of LastName and be finished.
If the value of FirstName is NOT null then we would like test the MiddleName field. If the MiddleName field is NOT null then give us that value in the query, as well as the LastName value.
So there can be 3 combinations:
LastName
FirstName, LastName
FirstName, MiddleName, LastName
Here is the code we've constructed thus far, which does work...however it is giving us a leading "half character" position before the value that is in the field, but only when there is a value in FirstName. So it turns out like this:
LastName
FirstName, LastName
FirstName, MiddleName, LastName
Our code attempts:
if ANYONE can shed ANY light on this...it would be GREATLY appreciated.
TIA,
CJK
We're working with three fields: FirstName,MiddleName, and LastName
We're trying to get the following output:
If the value in FirstName is null, then we would like to simply give us the value of LastName and be finished.
If the value of FirstName is NOT null then we would like test the MiddleName field. If the MiddleName field is NOT null then give us that value in the query, as well as the LastName value.
So there can be 3 combinations:
LastName
FirstName, LastName
FirstName, MiddleName, LastName
Here is the code we've constructed thus far, which does work...however it is giving us a leading "half character" position before the value that is in the field, but only when there is a value in FirstName. So it turns out like this:
LastName
FirstName, LastName
FirstName, MiddleName, LastName
Our code attempts:
expr4: IIf([FirstName] Is Null,[LastName],IIf([MiddleName] Is Null,[LastName],[FirstName] & " " & [MiddleName] & " " & [LastName]))
expr5: IIf([FirstName] Is Null,[LastName],[FirstName] & IIf([MiddleName] Is Null,""," " & [MiddleName])) & [LastName]
if ANYONE can shed ANY light on this...it would be GREATLY appreciated.
TIA,
CJK