Adding up - my nightmere

G

Guest

Hi

I have a stock/orders etc database.

i have an orders form with a orders subform inside it. on the subform i have
quantity, unit price, discount - i want to total these, how do i do that...

Once they have been total, i want a field on the orders form saying 'orders
subtotal' so i want it to add up the total for the order in the subform and
display it in that field.

for example: 3 items at £1.10, with 10% discount = and 1 item at £100.00,
with 0% discount =
, then a subtotal to total all the items up before tax.

thanks
 
J

Jeff Boyce

Sounds like a spreadsheet. Or an Order/OrderDetails-like database
application.

Have you checked out the sample that comes with Access (Northwind db)?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Günther

Here is an idea based on imagined tables

Select order.id, order.sometext, Sum( orderdetail.price - (
orderdetail.price / 100 * orderdetail.discount ) )
From orderdetail inner join order On (order.id = orderdetail.orderid)
group by order.id, order.sometext

This will list you all orders with a sum of the ordered items discounted
price

Good luck
Günther
 

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