Report control display

  • Thread starter Thread starter Les
  • Start date Start date
L

Les

You can add a new textbox on your report, and build the
control source:

=iif(Index = "O", Amount1, iif(Index = "L", Amount1, iif
(Index = "M", Amount1, iif(Index = "S", AMount1,Amount2))))

Probably nicer ways to do it, but this should work.
-----Original Message-----
I am trying to set a display to show information bases on
what is in another field, I am not sure that it is
possible. Here is an example:
the querry has the fields:
Index Amount1 Amount2

I want the report to show Amount1 if Index contians O, L,
M or S and show amount2 if Index shows anything else.
 
Basically the post from LES is correct.
There are a couple of things to sider. Jennifer
indicated "if Index contians"
Could there be multiple entries in the Index?
if so you could modify Les' formula to:
IIf([Index] Like "*O*" Or [Index] Like "*L*" Or [Index]
Like "*M*" Or [Index] Like "*S*",[AMount1],[Amount2])
otherwise
IIf([Index] ="O" Or [Index] ="L" Or ="M" Or [Index] ="S",
[AMount1],[Amount2])
Hope this helps.
Fons
 
Back
Top