G
Guest
I am using Access 2000. I am trying to create a macro to set a value of a
form field (AmtDue) based upon one of five nested conditions:
1) If CodeFieldA = "S" or "M", then AmtDue = 0
Else
2) If CodeFieldB Like "RB*, then AmtDue = 0
Else
3) If RateFieldA > RateFieldB then AmtDue = RateFieldA - RateFieldB
Else
4) If RateFieldA < RateFieldB then AmtDue = RateFieldA
Else
5) If RateFieldA = RateFieldB then AmtDue = RateFieldB.
Each subsequent test is based upon a False condition on the prior condition,
the last condition RateFieldA = RateFieldB is the default.
How do I code this?
form field (AmtDue) based upon one of five nested conditions:
1) If CodeFieldA = "S" or "M", then AmtDue = 0
Else
2) If CodeFieldB Like "RB*, then AmtDue = 0
Else
3) If RateFieldA > RateFieldB then AmtDue = RateFieldA - RateFieldB
Else
4) If RateFieldA < RateFieldB then AmtDue = RateFieldA
Else
5) If RateFieldA = RateFieldB then AmtDue = RateFieldB.
Each subsequent test is based upon a False condition on the prior condition,
the last condition RateFieldA = RateFieldB is the default.
How do I code this?