Add OR IIF to my statement

  • Thread starter Thread starter Jon Dibble
  • Start date Start date
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.
 
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.
 
Back
Top