Multiple IIf Statements

J

Jill Burling

I am trying to write an IIF statement that shows the following:

Expr1: IIf([Borrower Claim]="Borrower","Borrower",IIf([Repo
Claims]="Repo","Repo",IIf([RepoSource
Claims]="RepoSource","RepoSource",IIf([GAP Claims]="GAP","GAP",IIf([Skip
Claims]="Skip","Skip")))))

I am using the Expression field... any help would be appreciated.
 
R

Ron2006

On the surface your expression will give you a result. There do not
appear to be any syntax errors.

My question is hierarchy. If a record has "Borrower Claim" equal to
Borrower AND "Skip Claims" equal to "Skip", the expression will
result in "Borrower" since that is the first test that was
successful. What value do you want to be the final answer?

Basically you need to make the test that has the highest priority
FIRST and on down the line.

The iif logic stops making further tests once it gets a positive
(true) answer to the test.

Ron
 
J

Jill Burling

Okay got that.. I changed it from an expression to a Max.. what I am trying
to get is the following:

The result should only pull either Borrower, Repo, etc, etc. So I thought I
would change this from an expression to a Max.
 
J

Jill Burling

Also each condition is exclusive.

If Borrower is true can not be any other condition.

Just thought I should share that info with you.

Thanks!! :)
 
D

Duane Hookom

If only one of the fields can contain a value then I think your structure is
wrong. There should be a field for ClaimType and then a field for the
ClaimAmt(?).

Can you explain your table structure and what you are attempting to do?
 

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

Top