override a calculation

tbcwarrior

Registered User.
Local time
Today, 06:08
Joined
Oct 10, 2006
Messages
26
i have a database form with a field called commitment fee

in that field is a calculation

=-IIf([Type of finance]="Term Loan",([Total amount requested]*0.015),-([Total amount requested]*0.01))

But sometimes i want to be able to override this and input a different value like 0.00 if the amount has been paid.

any ideas what the code would be for this

regards
chris
 
The query needs to know when to use the calculation, and when not to.

Assuming that you have a field in your query called [Paid] that contains this information, then your code would be something like:
IIF([Paid]="Yes",0,-IIf([Type of finance]="Term Loan",([Total amount requested]*0.015),-([Total amount requested]*0.01)))

You would have to modify this to suit the kind of data in your [Paid] field. The example above assumes it to be a text field with the value "Yes" if the amount has been paid, and something else if it hasn't.
 

Users who are viewing this thread

Back
Top Bottom