IIf Problems

X

Xjcinhoustonx

I have a query that has the following statement

35 DN Bonus: IIf([Dnpmt Perc Of Total]>=0.35 And [Dnpmt Perc Of
Total]<1,[35% Down Bonus]![Total 35% DN Bonus],0)

This works fine if the total in [35% Down Bonus]![Total 35% DN Bonus] has a
value. But when it is equal to or greater than .35 and has a zero value, I
just get blank results.

Some one suggested a nested IIf statement and I have tried several that
don't work at all.

Does anyone have any suggestions on how to write this?
 
K

KARL DEWEY

But when it is equal to or greater than .35 and has a zero value, I just
get blank results.
This does not make sense. How can it have zero value and be equal to or
greater than .35?

Maybe you need this --
35 DN Bonus: IIf([Dnpmt Perc Of Total]>=0.35 And [Dnpmt Perc Of
Total]<1,[35% Down Bonus]![Total 35% DN Bonus],0) Or Is Null
 
X

Xjcinhoustonx

No this did not work, It just returned all blanks.

KARL DEWEY said:
get blank results.
This does not make sense. How can it have zero value and be equal to or
greater than .35?

Maybe you need this --
35 DN Bonus: IIf([Dnpmt Perc Of Total]>=0.35 And [Dnpmt Perc Of
Total]<1,[35% Down Bonus]![Total 35% DN Bonus],0) Or Is Null


Xjcinhoustonx said:
I have a query that has the following statement

35 DN Bonus: IIf([Dnpmt Perc Of Total]>=0.35 And [Dnpmt Perc Of
Total]<1,[35% Down Bonus]![Total 35% DN Bonus],0)

This works fine if the total in [35% Down Bonus]![Total 35% DN Bonus] has a
value. But when it is equal to or greater than .35 and has a zero value, I
just get blank results.

Some one suggested a nested IIf statement and I have tried several that
don't work at all.

Does anyone have any suggestions on how to write this?
 
K

KARL DEWEY

Please explain to me how you can it have zero value and be equal to or
greater than .35?


Xjcinhoustonx said:
No this did not work, It just returned all blanks.

KARL DEWEY said:
But when it is equal to or greater than .35 and has a zero value, I just
get blank results.
This does not make sense. How can it have zero value and be equal to or
greater than .35?

Maybe you need this --
35 DN Bonus: IIf([Dnpmt Perc Of Total]>=0.35 And [Dnpmt Perc Of
Total]<1,[35% Down Bonus]![Total 35% DN Bonus],0) Or Is Null


Xjcinhoustonx said:
I have a query that has the following statement

35 DN Bonus: IIf([Dnpmt Perc Of Total]>=0.35 And [Dnpmt Perc Of
Total]<1,[35% Down Bonus]![Total 35% DN Bonus],0)

This works fine if the total in [35% Down Bonus]![Total 35% DN Bonus] has a
value. But when it is equal to or greater than .35 and has a zero value, I
just get blank results.

Some one suggested a nested IIf statement and I have tried several that
don't work at all.

Does anyone have any suggestions on how to write this?
 
X

Xjcinhoustonx

I have a table that has the items we will pay a bonus on if the downpayment
is >35% but less that 100% of the total sale ( Table A). I have another
table that we enter the items sold (Table B). I have a query that calculated
the bonus on the items that qualify. That is the total I want it to o get.
I think that my problem is stemming from the total on the the other query
being zero.

KARL DEWEY said:
Please explain to me how you can it have zero value and be equal to or
greater than .35?


Xjcinhoustonx said:
No this did not work, It just returned all blanks.

KARL DEWEY said:
But when it is equal to or greater than .35 and has a zero value, I just
get blank results.
This does not make sense. How can it have zero value and be equal to or
greater than .35?

Maybe you need this --
35 DN Bonus: IIf([Dnpmt Perc Of Total]>=0.35 And [Dnpmt Perc Of
Total]<1,[35% Down Bonus]![Total 35% DN Bonus],0) Or Is Null


:

I have a query that has the following statement

35 DN Bonus: IIf([Dnpmt Perc Of Total]>=0.35 And [Dnpmt Perc Of
Total]<1,[35% Down Bonus]![Total 35% DN Bonus],0)

This works fine if the total in [35% Down Bonus]![Total 35% DN Bonus] has a
value. But when it is equal to or greater than .35 and has a zero value, I
just get blank results.

Some one suggested a nested IIf statement and I have tried several that
don't work at all.

Does anyone have any suggestions on how to write this?
 
K

KARL DEWEY

Post the SQL for the two queries.

Xjcinhoustonx said:
I have a table that has the items we will pay a bonus on if the downpayment
is >35% but less that 100% of the total sale ( Table A). I have another
table that we enter the items sold (Table B). I have a query that calculated
the bonus on the items that qualify. That is the total I want it to o get.
I think that my problem is stemming from the total on the the other query
being zero.

KARL DEWEY said:
Please explain to me how you can it have zero value and be equal to or
greater than .35?


Xjcinhoustonx said:
No this did not work, It just returned all blanks.

:

But when it is equal to or greater than .35 and has a zero value, I just
get blank results.
This does not make sense. How can it have zero value and be equal to or
greater than .35?

Maybe you need this --
35 DN Bonus: IIf([Dnpmt Perc Of Total]>=0.35 And [Dnpmt Perc Of
Total]<1,[35% Down Bonus]![Total 35% DN Bonus],0) Or Is Null


:

I have a query that has the following statement

35 DN Bonus: IIf([Dnpmt Perc Of Total]>=0.35 And [Dnpmt Perc Of
Total]<1,[35% Down Bonus]![Total 35% DN Bonus],0)

This works fine if the total in [35% Down Bonus]![Total 35% DN Bonus] has a
value. But when it is equal to or greater than .35 and has a zero value, I
just get blank results.

Some one suggested a nested IIf statement and I have tried several that
don't work at all.

Does anyone have any suggestions on how to write this?
 
Top