A statement that automatically compile calculation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I want to know how to create a statement that could automatically
calculate/given the 0.1% interest in next transaction if the total
transactionAmount greater than 2M (if the total transaction(accumulate)
greater that 2M then 0.1% interest will been automatically calculated.
Example...
Transaction Date CustometID TransactionAmount 0.1%Interest
12/06/2004 1234 1,000,000
12/07/2004 1234 900,000
12/08/2004 1234 500,000 (Only 400,000 was entitle to get
0.1 Int)
So....if this customer total transactionAmount reach 2M then whatever
transaction he makes on the next transaction will automatically given 0.1%
interest.
Hope you understand...thanks you very much.
 
Hi,

I want to know how to create a statement that could automatically
calculate/given the 0.1% interest in next transaction if the total
transactionAmount greater than 2M (if the total transaction(accumulate)
greater that 2M then 0.1% interest will been automatically calculated.
Example...
Transaction Date CustometID TransactionAmount 0.1%Interest
12/06/2004 1234 1,000,000
12/07/2004 1234 900,000
12/08/2004 1234 500,000 (Only 400,000 was entitle to get
0.1 Int)
So....if this customer total transactionAmount reach 2M then whatever
transaction he makes on the next transaction will automatically given 0.1%
interest.
Hope you understand...thanks you very much.

What's the interest rate below 2M? What are you doing with the
interest value once you get it?

What you could do is use

=DSum("[TransactionAmount]", "[YourTable]", "[CustomerID] = " &
[CustomerID] & " AND [Transaction Date] <= #" & [Transaction Date] &
"#")

to sum this and all prior transactions. An IIF() function call could
then partition this into sub- and over-2M pieces.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Back
Top