-----Original Message-----
Terry
I go into Access Report Design View. Click on a field. Then go to
Conditional Fotmatting.. Then into Expression is. Im going to be usings two
fields [nDIST] and [nPP1DIS]. Here is what I want to accomplish.
1. Whenever [nDIST] is 1.5 > [nPP1DIS] I want [nPP1DIS] field in the view
mode to display nothing. When [nDIST] is <1.5[nPP1DIS] I want the nPP1DIS
number to be displayed.
2. Whenever [nDIST] is 1.5 < [nPP1DIS] I want [nPP1DIS] field in the display
mode to show nothing. And when it isnt to display [nPP1DIS].
Basically what Im trying to explain is when the difference between [nDIST]
and [nPP1DIS] is less than 1.5 I want the field in [nPP1DIS] to be blank,
but when it is less than 1.5 I want to the [nPP1DIS] to display whatever
number is in there.
Note sometimes the difference between [nDIST] and [nPP1DIS] will be positive
and sometimes it will be negative.
Your formula IIf([nDIST]-[nPP1DIS]>1.5,"",Etc wouldnt work because it would
display the difference between [nDIST] and [nPP1DIS] when I only wanted to
see [nPP1DIS]
I sure hope I havent totally confused you .If I did please say so and I will
try and explain it another way.
Sure appreciate the help
ed
Terry said:
ed,
You don't say where you are putting this equation. I will
assume it is in a control on a form or report .... ?
You want to use an immediate if statement to evaluate your
equation and do the corresponding calculation. Try:
IIF ([nDIST]-[nPP1DIS]>1.5, "",[nDIST]-[nPP1DIS])
The two double quotes after the first comma will display
nothing if the result is greater that 1.5 otherwise
perform the calculation [nDIST]-[nPP1DIS].
If I have misunderstood or you need more assistance pls
post back.
HTH
Terry
-----Original Message-----
I am putting the following equation in my expression.
[nDIST]-[nPP1DIS]>1.5 When this occurs I wont show
anything on the screen.
When [nDIST] = 6 and [nPP1DIS] = 8 I would assume the
results would be a -2
an d it would show that field on the screen. That field
doesnt appear on the
screen. What am I doing wrong and how can I correct it?
Thanks for any help
ed
.
.