revers minus

M

mh_amri

hi guyz,we have little office and want to make some regular thing machinary
here it is:
we sell stuffs(for example think us as a newspaper company) , we give
newspaper to our seller and then they return the amount of newspaper that
remains at the end of the week , and because every day have a special rate
for income its important to calculate the sell amount from beginning
for example i give 150,100,250,400 newspaper to the seller and at the end of
the week he claim 300 of them has been sold, it means he sold out(*) 150 in
first day , and 100 in 2nd day and 50 in 3rd day9(**), and must return 200
for 3rd day and 400 for the 4th day
for this purpos i made a query that collect data about the day and the
amount that we gave the seller, and designed a form that take the amount of
that the seller sold out(this amount is a number for a whole week, for
example 300 ) , the problem is calculating the sold amount for each day(see
from * to **) , because each day have a rate value that it has read from
another table and multiply by the amount that sold on that day
i mean i want to do generate a table like this:
[seller] [day] [give amount] [sold amount] [retun amount]
1 1 150 150 0
1 2 100 100 0
1 3 250 50 200
1 4 400 0
400

my problem is calculating the the [sold amount] , the weekly returned amount
has entered in a form (here is 300) i have to give 300 to access and generate
the [sold amount]
i used many ways, but because the calculation of each row need to access the
last row data all of that way failed
anyway , any comment will appreciate
 
B

Bob Barrows

mh_amri said:
hi guyz,we have little office and want to make some regular thing
machinary here it is:
we sell stuffs(for example think us as a newspaper company) , we give
newspaper to our seller and then they return the amount of newspaper
that remains at the end of the week , and because every day have a
special rate for income its important to calculate the sell amount
from beginning
for example i give 150,100,250,400 newspaper to the seller and at the
end of the week he claim 300 of them has been sold, it means he sold
out(*) 150 in first day , and 100 in 2nd day and 50 in 3rd day9(**),
and must return 200 for 3rd day and 400 for the 4th day
for this purpos i made a query that collect data about the day and the
amount that we gave the seller, and designed a form that take the
amount of that the seller sold out(this amount is a number for a
whole week, for example 300 ) , the problem is calculating the sold
amount for each day(see from * to **) , because each day have a rate
value that it has read from another table and multiply by the amount
that sold on that day
i mean i want to do generate a table like this:
[seller] [day] [give amount] [sold amount] [retun amount]
1 1 150 150
0 1 2 100 100
0 1 3 250 50
200 1 4 400 0
400

my problem is calculating the the [sold amount] , the weekly returned
amount has entered in a form (here is 300) i have to give 300 to
access and generate the [sold amount]
i used many ways, but because the calculation of each row need to
access the last row data all of that way failed
anyway , any comment will appreciate

Show us the structure (field names and data types) of the source data,
please. It's tough to tell you how to generate a result without knowing what
the data originally looks like.
 

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