Expression

N

Novice2000

Hi,

I am trying to recreate a query using the same tables and one of the
expressions is this: Salutation: IIf([company]=([FirstName] & " " &
[LastName])," ",[Salutation1])

What I can't figure out is why it will not display in the new query. The
tables are the same. Any idea?
 
S

scubadiver

The expression isn't clear to me. Why would you want a company to equal a
first and last name? Can you clarify?
 
N

Novice2000

Sometimes a company is a Sole Proprietorship and the name of the company is
the name of the owner of the company like John Smith.

scubadiver said:
The expression isn't clear to me. Why would you want a company to equal a
first and last name? Can you clarify?

--

The 11th day of every month:

http://truthaction.org/forum/index.php


Novice2000 said:
Hi,

I am trying to recreate a query using the same tables and one of the
expressions is this: Salutation: IIf([company]=([FirstName] & " " &
[LastName])," ",[Salutation1])

What I can't figure out is why it will not display in the new query. The
tables are the same. Any idea?
 
S

scubadiver

If the expression true then you are evaluating it to give a space (" ").
Swap them:

IIf([company]=([FirstName] & " " & [LastName]),[Salutation1]," ")



--

The 11th day of every month:

http://truthaction.org/forum/index.php


Novice2000 said:
Sometimes a company is a Sole Proprietorship and the name of the company is
the name of the owner of the company like John Smith.

scubadiver said:
The expression isn't clear to me. Why would you want a company to equal a
first and last name? Can you clarify?

--

The 11th day of every month:

http://truthaction.org/forum/index.php


Novice2000 said:
Hi,

I am trying to recreate a query using the same tables and one of the
expressions is this: Salutation: IIf([company]=([FirstName] & " " &
[LastName])," ",[Salutation1])

What I can't figure out is why it will not display in the new query. The
tables are the same. Any idea?
 
N

Novice2000

I found out something weird and now it is being displayed. I was taking last
years query and altering it with 07 in place of 06 where appropriate. This
wasn't the only field that wasn't being displayed. The only thing I can
figure is that Access did not like the fact that I was not starting fresh.
When I built the query from scratch it works fine. Go figure? Thanks for your
help.

scubadiver said:
If the expression true then you are evaluating it to give a space (" ").
Swap them:

IIf([company]=([FirstName] & " " & [LastName]),[Salutation1]," ")



--

The 11th day of every month:

http://truthaction.org/forum/index.php


Novice2000 said:
Sometimes a company is a Sole Proprietorship and the name of the company is
the name of the owner of the company like John Smith.

scubadiver said:
The expression isn't clear to me. Why would you want a company to equal a
first and last name? Can you clarify?

--

The 11th day of every month:

http://truthaction.org/forum/index.php


:

Hi,

I am trying to recreate a query using the same tables and one of the
expressions is this: Salutation: IIf([company]=([FirstName] & " " &
[LastName])," ",[Salutation1])

What I can't figure out is why it will not display in the new query. The
tables are the same. Any idea?
 
Top