473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to fix Error when trying to write an if statement?

I am receiving an error


Numeric Numeric Rating: IIf([monthlyExtractorIPH]![KXT Rating]="Exceeds" OR [KXT Rating] ="Me: IIf([monthlyExtractorIPH]![KXT Rating]="Exceeds","3")
Jan 31 '11 #1
4 1287
Rabbit
12,516 Expert Mod 8TB
I'm not sure what you're trying to do but here's how your IIf breaks out.
Expand|Select|Wrap|Line Numbers
  1. IIf(
  2. [monthlyExtractorIPH]![KXT Rating]="Exceeds"
  3. OR
  4. [KXT Rating]="Me: IIf([monthlyExtractorIPH]![KXT Rating]="
  5. Exceeds"
  6. ,
  7. "3"
  8. )
Here's how an IIf should be formatted.
Expand|Select|Wrap|Line Numbers
  1. IIf(
  2. expression
  3. ,
  4. trueValue
  5. ,
  6. falseValue
  7. )
Jan 31 '11 #2
I think the issue is I am not looking for a false value. I am looking for a true for 3 different senarios.

so IIf(
[monthlyExtractorIPH]![KXT Rating]="Exceeds" then "3"

IIf(
[monthlyExtractorIPH]![KXT Rating]="Meets" then "2"

IIf(
[monthlyExtractorIPH]![KXT Rating]="DNM" then "1"
Jan 31 '11 #3
Rabbit
12,516 Expert Mod 8TB
Your expression doesn't match your description at all. I see nothing in there about Meets or DNM. I see two Exceeds where the second Exceed is incorrectly syntaxed.

You also need to specify a false value, it's a required parameter of the IIf function.
Jan 31 '11 #4
Ok. I will try again. Thank You
Feb 1 '11 #5

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

Similar topics

2
by: Debbie | last post by:
Hi I have developed an application that access an SQL database and installed it on a different machine The installation is successful but when I try to run the application I get the following...
1
by: Jeff Thur | last post by:
I am getting this error when trying to run a stored procedure: Microsoft.VisualBasic.CompilerServices.LateBinding.LateInd exGet(Object o, Object args, String paramnames) +1361...
1
by: Ghanashyam | last post by:
Dotnet Framework 1.1 is installed on my computer running on Windows 2000 Professional.Visual Studio >net 2003 is installed.When I try to create an ASP.NET project I get following error. The web...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
1
by: dipesh | last post by:
I am getting error when trying to Add Web Reference in Visual Studio 2005. "Some of the files required for web references are not installed"
2
by: ticars | last post by:
I'm getting a weird error when trying to access a user control from within a base page during runtime. Here's what I have: I have a master page with a user control on it. I then have a few...
3
by: LRI41 | last post by:
I googled an error message and it came up with two posts on your forum and when I got there it said I needed to register to post my question, I am not sure whether is this the correct place to...
5
by: Martin | last post by:
I get below error when trying to write unicode xml to a zipfile. zip.writestr('content.xml', content.toxml()) File "/usr/lib/python2.4/zipfile.py", line 460, in writestr zinfo.CRC =...
1
by: jonny | last post by:
Went from using Visual Web Develop express to Visual Studio 2005 and getting error when trying to open project. Error message: "One or more projects in the solution could not be loaded for the...
1
by: hbsnam | last post by:
Getting following error when trying to add / submit a listing Warning: in_array() : Wrong datatype for second argument in /home/namibiac/public_html/addlisting.php on line 175 Warning:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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
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...

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.