473,406 Members | 2,371 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,406 software developers and data experts.

IIF Statement - If field is greater than other field by =/-percentage

Hello everyone,

I have the current formula
Expand|Select|Wrap|Line Numbers
  1. CompPassFail: IIf([specifiedComp]>[PCcomp],"Fail","Pass")
This works O.K, but I am being told that it should pass or fail if is within -/+3percent. Both field are percentage fields, where[specifiedComp]is the main number that [PCcomp] has to more or less align to.
Apr 4 '17 #1

✓ answered by NeoPa

IWestwell:
This works O.K, but I am being told that it should pass or fail if is within -/+3percent.
That doesn't actually make sense. I assume you mean that it will be a pass if it's within three percentage points of the pass threshold ([specifiedComp]).

If so then change it to :
Expand|Select|Wrap|Line Numbers
  1. CompPassFail: IIf([specifiedComp]-3>[PCcomp],'Fail','Pass')

1 849
NeoPa
32,556 Expert Mod 16PB
IWestwell:
This works O.K, but I am being told that it should pass or fail if is within -/+3percent.
That doesn't actually make sense. I assume you mean that it will be a pass if it's within three percentage points of the pass threshold ([specifiedComp]).

If so then change it to :
Expand|Select|Wrap|Line Numbers
  1. CompPassFail: IIf([specifiedComp]-3>[PCcomp],'Fail','Pass')
Apr 5 '17 #2

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

Similar topics

0
by: Jason Joines | last post by:
I have a table with an email field that contains values of the form uid@domain. I need to populate a new field called uid with just the uid part of the email address. Is there any way of using...
7
by: jballard | last post by:
Hello, I have a database set-up with a form and two subforms in it. I have one of the subforms (replacement parts) set-up where you can pick part numbers from a drop down box and also pick a...
9
by: geronimo_me | last post by:
Hi, I am atempting to compare part of a field with the whole of another field in access. Is this possible? Basically I have 2 tables with the following info: Table1 Field1 = MR.
12
by: Learning C# | last post by:
I hope this is an ok place to post real beginner stuff. Basically I need to know the difference between a field, and a static field. My book sux and doesn't explain this well. It seems that a...
5
by: Paulovič Michal | last post by:
hi all, I have problem with SERIAL field type (or sequence functionality). I have table with three columns - ID, IDS, NAME. I want auto-increment IDS grouped by ID. Example: 1, 1, Ferdo 1, 2,...
2
by: Brett | last post by:
My database has 2 tables: Table1 & Table2. If a field is not null on a record in table2, then the not null fields in table1 that correspond to the records in table1 needs to be updated to match the...
2
by: SF | last post by:
Hi, I am new to ASP.NET. I have started to create a new ASP.NET web. I can succesfully insert a table into a form but my form does not look good becuase some filed (from table) are foreigh key...
4
by: cacanene | last post by:
My question is what will be the fast algorithm to add records in a table based on the value of a field of other table. For example: TABLE2 contains two fields ID and DESCRIPTION TABLE1 contains...
5
by: parry2k | last post by:
I have one view with 3 fields like the view name is myview and it has following sql statement. select fn,ln,city from tablea I created a function like below:- create function myfun(in t...
8
by: mburch2000 | last post by:
I have an Excel file with two tabs: Source & Target. Using VBA (Macro), I am attempting to take data in Source and place in Target. The fields are normally manipulating in some form, so not a...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
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,...

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.