473,503 Members | 3,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Complex IF Statement in a plain Access Query.

133 New Member
i have an complex IF statement, however, i am receving incorrect data when it becomes complex. the simple statement is
Expand|Select|Wrap|Line Numbers
  1. ContractStatus: IIf([Contract Status]="Pending Legal","Pending Waiver",[Contract Status])
  2.  
additionally, the field needs be to evaluated for "Signed, In file." if that is the case, the field will receive a value of "active contract." however, a -1 value is generated off of a text field. this was not generate when it was a simple IF statement. the code is as follows:

Expand|Select|Wrap|Line Numbers
  1. ContractStatus: IIf([Contract Status]="Pending Legal","Pending Waiver",[Contract Status]) Or IIf([Contract Status]="Signed, In file","Active Contract",[Contract Status])
  2.  
Any assistance would be appreciated.
Jun 8 '10 #1
2 2462
mseo
181 New Member
@dowlingm815
hi,
try this
Expand|Select|Wrap|Line Numbers
  1. ContractStatus: IIf([Contract Status]="Pending Legal","Pending Waiver",IIf([Contract Status]="Signed, In file","Active Contract",[Contract Status]))
Jun 8 '10 #2
dowlingm815
133 New Member
@mseo
did the trick...THANK YOU!
Jun 9 '10 #3

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

Similar topics

1
5709
by: Sreeneet | last post by:
Hi all, I want to call a stored procedure which is written in SQL Server from an ms-access query. It is having some parameters also and the stored procedure will return some records. Is there...
2
1203
by: Dave Harrington | last post by:
Hi all - I got a pretty basic question that's been bugging me today. I'm using ASP.NET, C# and MS Access for a database driven application. I have a datagrid that will populate based on a...
1
5139
by: ValeSyde | last post by:
Hi, I tried searching for this answer but I'm not even sure what to look for. I'll do my best to explain. I'm trying to create a query in Access. I have multiple WHERE conditions and depending...
12
5246
by: zwasdl | last post by:
Hi, I'm using MS Access to query against Oracle DB via ODBC. Is it possible to use HINT in Access? Thanks, Wei
19
17944
MSeda
by: MSeda | last post by:
I would like to use a Global variable as a criteria in an access query. in my first attempt to do so I wrote a Function that looks like this Public Function GloVar(ByVal VarName) As String ...
3
7011
by: Idlemind23 | last post by:
Ahoy! I'm hoping for some help on what (I believe) should be a simple task. I have a form with a button. I would like that button to have a caption with a date. That date should be pulled out...
6
3047
by: TSIGOS1 | last post by:
Hello, I have created a query in Access and I want to be able to read the sql statement of the query using vba and then run it from excel vba. That is instead of copying and pasting all the query...
2
8477
by: buddyr | last post by:
example: field1 bblandscape, wallmart, kmart field2 4,6,9 field3 5,7,6 field4 12,0,5 field5 if field2 > field3 then field5 = "Yes" if field4 = 0 then field5 = "Yes"
6
4371
by: jsacrey | last post by:
Hey everybody, got a secnario for ya that I need a bit of help with. Access 97 using linked tables from an SQL Server 2000 machine. I've created a simple query using two tables joined by one...
17
19835
by: chadh | last post by:
Hello, I'm having some troubles exporting a query to a csv file. I am able to use the doCMD.TransferText to output the query to the csv file, however, I cannot get it to use the Export...
0
7192
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7315
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
7445
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5559
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,...
1
4991
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
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1492
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 ...
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.