> and <

  • Thread starter Thread starter Slipps
  • Start date Start date
S

Slipps

Hi Anyone
I am trying to build an IIf formulain access with a true if a number is more
than 99 but less than 200. Everytime it comes back that I am missing details
Coomma or closing Par. Could anyone please help me with this
 
Slipps said:
Hi Anyone
I am trying to build an IIf formulain access with a true if a number
is more than 99 but less than 200. Everytime it comes back that I am
missing details Coomma or closing Par. Could anyone please help me
with this

iif(a>99 AND a<200,<true part>,<false part>)
 
% format is just that -- a format. ACCESS stores the number as a fractional
value. Try this:

IIf([Realised Gain %]>0.99 And [Realised Gain %]<2.00,[Investment P/S]-
[Share Value]*10)

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


Slipps said:
Hi Bob
Thanks for the help. Below is the eqausion I am trying to achieve. The
[realised Gain %] is in % format. Can you try to help me again. Thanks
Expr1: IIf([Realised Gain %]>99 And [Realised Gain %]<200,[Investment
P/S]-
[Share Value]*10)

Bob said:
iif(a>99 AND a<200,<true part>,<false part>)
 
Hi Bob
Thanks for the help. Below is the eqausion I am trying to achieve. The
[realised Gain %] is in % format. Can you try to help me again. Thanks
Expr1: IIf([Realised Gain %]>99 And [Realised Gain %]<200,[Investment P/S]-
[Share Value]*10)



iif(a>99 AND a<200,<true part>,<false part>)- Hide quoted text -

- Show quoted text -

Percentages are really a decimal type number. By that I mean that the
value that would show as 50% is really a decimal of .5.

Therefore your test should be >.99 and < 2

greater than dot 9 and less than the whole number 2


since the actual value may have more decimal places than what are
showing you may get some positive selections for a value of .
99999 so you may have to make that part of the test as not <
1.0



Ron
 
Note that you also need to supply the 'not true' part, in other words, iif
must have 3 arguments, you only have 2.

Vanderghast, Access MVP


Slipps said:
Hi Bob
Thanks for the help. Below is the eqausion I am trying to achieve. The
[realised Gain %] is in % format. Can you try to help me again. Thanks
Expr1: IIf([Realised Gain %]>99 And [Realised Gain %]<200,[Investment
P/S]-
[Share Value]*10)

Bob said:
iif(a>99 AND a<200,<true part>,<false part>)
 
Back
Top