If Statement multiple conditions

  • Thread starter Thread starter allie357
  • Start date Start date
A

allie357

I have an if statement where I think the logic is messed up.

CV2: IIf([qry_Adam_RC Target Comm_Grouped]![CV]='On Contract','On
Contract',IIf([tblBuyers]![BuyerName] Is Not Null,'Central Buyer On
Contract','Off Contract'))


It is mislabeling some of the Central Buyer spend. What i need it do
is if CV equals on contract then CV2 needs to be On Contract, if it
is
off contract then I need to it be off contract. If the name if in
Table Buyers is not null I need it to be labeled Central Buyer on
Contract regardless of whether it is on or off contract in CV.


Any help is appreciated
 
Since your BuyerName on Contract is more important to your output, it should
be first in your IF statement.

It should probably be like this:

CV2: IIf([tblBuyers]![BuyerName] Is Not Null,'Central Buyer On Contract',
IIf([qry_Adam_RC Target Comm_Grouped]![CV]='On Contract','On Contract','Off
Contract'))


Bryan
 

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

Back
Top