Calculate Null in query question

J

jwr

I have the following query:

SELECT Customers.ControlNum, Orders.OrderID, Payments.PaymentDate,
Payments.EssettNumber, Payments.EssettDate, [PaymentAmount]*0.95 AS [Essett
$]
FROM ((Customers INNER JOIN Orders ON Customers.CustomerID =
Orders.CustomerID) LEFT JOIN Payments ON Orders.OrderID = Payments.OrderID)
INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID
WHERE (((Payments.PaymentDate) Between Date()-7 And Date()));


Example: Customer Orders $1000.00 goods
Trades in - 500.00
(Owes) Pays 500.00

My query is currently calculating $500 X .95 = $475.00.
What I need is the amount before trade -- $1000 X .95 = $950.00.

The trade-in amount is a line item in the order by customer form and I would
need to add that to my query. BUT how do I work with a negative to not
calculate?

What I really need is payment amount plus the amount of trade-in allowed
(negative amount) multiplied by .95.

Your assistance is appreciated.

JR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top