473,465 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

IIF-EEEEE proposition

Presto731
53 New Member
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?
Aug 23 '07 #1
1 1022
Stwange
126 Recognized Expert New Member
IIf([ColumnA]="yes",[ColumnB],0) should do the trick
Aug 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: SPAFA | last post by:
I am trying to convert this query to slq server 2000 and I cant figure out how to get rid of the IIF statements and make them case statements. If anyone could help I would greatly appreciate...
7
by: mark | last post by:
Access 2000: I creating a report that has a record source built by the user who selects the WHERE values. An example is: SELECT * FROM CHARGELOG WHERE STDATE Between #10/27/2003# And...
3
by: Susie Swint | last post by:
I have the following IIf statement which worked in Access 95 but will not work in Access 2002. The error message I get is that the expression is typed incorrectly, or is too complex to be...
3
by: Chesne | last post by:
I'm trying to use IIF and having hasseles. The statement below is a generic example of what I am trying to achieve but of course it will not work! IIf(>=13,"1") Or IIf( Between 1 And 18,"1"...
9
by: SQLScott | last post by:
I have always heard that using IIF statements is not recommended because they are slower than using If..Then statements, and not as "clean". I would appreciate others opinions and why/why not use...
8
by: Ragbrai | last post by:
Howdy All, I have a query that is used for filtering results to be used in a combo box. The query needs to test fields from both a table and then unbound text boxes on the form that also contains...
8
by: Stinky Pete | last post by:
OK, I am thoroughly confused. All I am trying to do is fill in a Status field on my form with the condtions below, with all my theory being based on what I have read in various newsgropups. The...
2
by: sonjuraec | last post by:
Hello, I work at a college and have written several different IIf statements to evaluate whether or not a student is registered for the correct course. All of the fields referenced are pulled into a...
40
by: chhines | last post by:
I have a very long IIf statement. I think maybe I've reached the limit of how many choices you can have in the control source "Build" statement of a text box on a form. Really, the IIF statement is...
8
by: RonnieG | last post by:
I'm trying to create a function in a query but not sure how or if it's the most effecient way. Here is what I'm wanting to do: If the = Yes and the > use the , if the is not null and the > use...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.