IIF Query help

G

Guest

I have an IIF query that currently looks like this:

GlobalType: IIf([SuperCircuit_IDs].[Type] Is Not
Null,[SuperCircuit_IDs].[Type],[Customers].[Type])

I need to add one more argument. I have another query named "Affiliate"
with a CustomerName field. If this field is not null, I want the GlobalType
to be "Affiliate", otherwise, the same rules as shown above.

1. SuperCircuit_IDs.Type is first choice
2. Customers.Type is second choice
3. But if Affiliate.CustomerName is not null, then "Affiliate"
Otherwise, 1 or 2.

Can this be done?

Thanks! Mary
 
G

Guest

Use a nested IIF (Don't forget an extra closed bracket at the end)

GlobalType: IIf([Affiliate].[CustomerName] Is Not Null,"Affiliate", IIf
[SuperCircuit_IDs].[Type] Is Not
Null,[SuperCircuit_IDs].[Type],[Customers].[Type]))
 

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