Add OR IIF to my statement

J

Jon Dibble

Hi
Can anyone please help me add to my statement?

Currently it returns text based on data in a string field on our database.

What I need to add is that if other strings like "7701" or "8901" appear in
the database field then return other text I specify.

Expr2: IIf([dbo_customer]![SALESMAN]="2501","Tracey","No Rep")

Any help would be greatly appreciated.
 
K

Ken Snell [MVP]

Are you wanting to show the "Tracey" or "No Rep" string in place of what's
in the SALESMAN field? If yes, then your expression of using a calculated
field is correct.

If you want to have "multiple" possibilities, then this is an example:

Expr2:
IIf([dbo_customer]![SALESMAN]="2501","Tracey",IIf([dbo_customer]![SALESMAN]="7701","Tom",IIf([dbo_customer]![SALESMAN]="8901","Tim","No
Rep")))

However, I'm guessing that you have a table somewhere that identifies 7701
as Tracey, etc.? If so, join that table into your query and return the field
from that table instead of the SALESMAN field from dbo_customer table.
 

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

Similar Threads


Top