R
rpbsr
I have a discount table based on Income and PeopleNumber (below) that works
with a query and DLookUp expression to produce good results for two
discounts. I can't figure how to return a zero discount when applicable based
on these fields.
=DLookUp("DiscountAmt","qryDiscounts","PeopleNumber=" & [PeopleNumber] & "
And " & [Income] & "<[MaxIncome]")
DiscountID DiscountAmt PeopleNumber MaxIncome
1 0.75 8 $49,050.00
2 0.75 7 $46,050.00
3 0.75 6 $43,100.00
4 0.75 5 $40,100.00
5 0.75 4 $37,150.00
6 0.75 3 $33,450.00
7 0.75 2 $29,700.00
8 0.75 1 $26,000.00
9 0.5 8 $78,450.00
10 0.5 7 $73,700.00
11 0.5 6 $68,950.00
12 0.5 5 $64,200.00
13 0.5 4 $59,450.00
14 0.5 3 $53,500.00
15 0.5 2 $47,550.00
16 0.5 1 $41,600.00
with a query and DLookUp expression to produce good results for two
discounts. I can't figure how to return a zero discount when applicable based
on these fields.
=DLookUp("DiscountAmt","qryDiscounts","PeopleNumber=" & [PeopleNumber] & "
And " & [Income] & "<[MaxIncome]")
DiscountID DiscountAmt PeopleNumber MaxIncome
1 0.75 8 $49,050.00
2 0.75 7 $46,050.00
3 0.75 6 $43,100.00
4 0.75 5 $40,100.00
5 0.75 4 $37,150.00
6 0.75 3 $33,450.00
7 0.75 2 $29,700.00
8 0.75 1 $26,000.00
9 0.5 8 $78,450.00
10 0.5 7 $73,700.00
11 0.5 6 $68,950.00
12 0.5 5 $64,200.00
13 0.5 4 $59,450.00
14 0.5 3 $53,500.00
15 0.5 2 $47,550.00
16 0.5 1 $41,600.00