Combing expressions

E

emc

I have two separate text boxes in a report. I have put an expression in each
box being:

=IIf([ManageAnnualSum]=Not True,0,[ManageAnnualSum]/4)

and

=IIf([Manage%]=Not True,0,[Manage%]*[RentPQ])

What I would like to do, if possible, is to have the two expressions in the
one text box so that if the ManageAnnualSum has no entry then it will put in
the Manage% sum. Is this possible?

Any help would be very much appreciated.

emc
 
R

Rick B

I would think it would be...

=Iif ([ManagerAnnualSum]=True,[ManageAnnualSum]/4,[Manage%]*[RentPQ])
 
B

BruceM

Is "Not True" the actual text for which you are looking? In other words,
are you testing to see if the words "Not True" appear in the text box? If
you are looking for an empty text box or field, use "". However, if
[ManageAnnualSum] is text, you cannot perform math on it without converting
it. I think that would be something like:
=IIf([ManageAnnualSum] = "",[Manage%]*[RentPQ],Value([ManageAnnualSum])/4)

If [ManageAnnualSum] is a number field (or a text box bound to a number
field), you would do something like:
=IIf([ManageAnnualSum] = 0,[Manage%]*[RentPQ],[ManageAnnualSum]/4)

or maybe:
=IIf([ManageAnnualSum] Is Null,[Manage%]*[RentPQ],[ManageAnnualSum]/4)
 
E

emc

Rick B,

Many thanks for this, but I can't seem to get it to work. I have put it in
exactly the way you say but it only shows the first expression's results -
never the second.

Rick B said:
I would think it would be...

=Iif ([ManagerAnnualSum]=True,[ManageAnnualSum]/4,[Manage%]*[RentPQ])




--
Rick B



emc said:
I have two separate text boxes in a report. I have put an expression in
each
box being:

=IIf([ManageAnnualSum]=Not True,0,[ManageAnnualSum]/4)

and

=IIf([Manage%]=Not True,0,[Manage%]*[RentPQ])

What I would like to do, if possible, is to have the two expressions in
the
one text box so that if the ManageAnnualSum has no entry then it will put
in
the Manage% sum. Is this possible?

Any help would be very much appreciated.

emc
 
E

emc

BruceM,

You are correct - it is a number field and I have used
=IIf([ManageAnnualSum] Is Null,[Manage%]*[RentPQ],[ManageAnnualSum]/4).

Many thanks indeed.

emc

BruceM said:
Is "Not True" the actual text for which you are looking? In other words,
are you testing to see if the words "Not True" appear in the text box? If
you are looking for an empty text box or field, use "". However, if
[ManageAnnualSum] is text, you cannot perform math on it without converting
it. I think that would be something like:
=IIf([ManageAnnualSum] = "",[Manage%]*[RentPQ],Value([ManageAnnualSum])/4)

If [ManageAnnualSum] is a number field (or a text box bound to a number
field), you would do something like:
=IIf([ManageAnnualSum] = 0,[Manage%]*[RentPQ],[ManageAnnualSum]/4)

or maybe:
=IIf([ManageAnnualSum] Is Null,[Manage%]*[RentPQ],[ManageAnnualSum]/4)

emc said:
I have two separate text boxes in a report. I have put an expression in
each
box being:

=IIf([ManageAnnualSum]=Not True,0,[ManageAnnualSum]/4)

and

=IIf([Manage%]=Not True,0,[Manage%]*[RentPQ])

What I would like to do, if possible, is to have the two expressions in
the
one text box so that if the ManageAnnualSum has no entry then it will put
in
the Manage% sum. Is this possible?

Any help would be very much appreciated.

emc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top