Calculation in Query

H

Hardhit

Hello All,

I have a table which contains the orders from a customer. This table is
filled out of an excel sheet which I import.
The datastructure is as follows :

PartNr OrderQty DelivDate PendQty
12345 100 BackOrd 200
12345 200 10/01/08
12345 150 20/01/08

Only on the first line for each partnumber there could be a PendQty.
The pending Qty shows the quantity received but not yet confirmed by the
customer.
When I want to calculate the open quantity to deliver I do a calculation in
a query where I deduct from the OrderQty the PendQty.
This means in the above shown example that the OrderQtyCalc results in -100.
This is fine but now my problem appears.
I would now need to deduct this quantity from the next OrderQty. How would I
do this in access ?

When this is done I attach this to a Bill of Material system to calculate
the parts to order and to send this information to the suppliers.
The result of the query should be like the example below.

PartNr OrderQty DelivDate PendQty OrderQtyCalc
12345 100 BackOrd 200 -100
12345 200 10/01/08 100
12345 150 20/01/08 150

Thanks in advance for the help

Peter
 

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