Editing a Calculation

danian

Registered User.
Local time
Today, 17:42
Joined
Jun 27, 2005
Messages
54
I have a form that calculates the total cost. It also as an option to revoke the transaction. The code used is below:

=DSum("Cost","tblTransactions","OrderID = " & [ID] & " AND Revoked = False")

I have since added in the option to Discount a product. It writes back to the same table but I can not work out how to edit the code so it calculates the sum correctly.

New fields on table:

Discounted – Yes/No
Discount – Number

I have used this method before:

Cost*(100-[Discount])/100

But how do I put it all together so I get the correct calculation.
 

Users who are viewing this thread

Back
Top Bottom