Connecting Tech Pros Worldwide Forums | Help | Site Map

IIF-EEEEE proposition

Presto731's Avatar
Member
 
Join Date: Jul 2007
Posts: 53
#1: Aug 23 '07
I have a query pulling from another that takes into account two columns to arrive at one on the new query.

I need to get my IIf statement working correctly, but cannot seem too. Here's an example

ColumnA is a yes or no answer, if the answer is yes it pulls the data from another column, call it ColumnB. but if the answer is no, then the column should be zero. So if ColumnA=Yes and ColumnB=100, then ColumnC=100, however if ColumnA=NO and ColumnB=100, Then ColumnC should = 0

I got it to work up to this point:

IIf([ColumnA]="yes",[ColumnB]
this part does ok.

What is the second component?

Expert
 
Join Date: Aug 2007
Posts: 122
#2: Aug 23 '07

re: IIF-EEEEE proposition


IIf([ColumnA]="yes",[ColumnB],0) should do the trick
Reply


Similar Microsoft Access / VBA bytes