D
doyle60
I completed a query that seemed to work except for the fact that it
became too complex and Access simply refused to run it. I tried
splitting it into parts but it was still too complex.
Here is the problem. I have a record of data for On Hand (goods in a
warehouse) and Projections (predicted needs) per month. So for one
record (an SKU, five or six keys) I may have these for units (OH = On
Hand):
OH M01 M02 M03 M04 M05 M06 M07 M08 M09 M10 M11 M12
1000 200 100 500 300 100 150 150 200 600 100
100 120
The M01, M02, etc. are fixed fields I created with M01 always the
current month.
What I want to do is to make a query that turns this into what I need
to order for future production. In the above that 1000 On Hand will
last until M04 with 100 short. So I need 100 for M04. But I also
have to order three months of inventory at a time so I want that 100
balance to be added to the next two months needs (100 and 150) to get
350. Than I want to put in what the next production orders should
be. So the above line should turn into this:
OH M01 M02 M03 M04 M05 M06 M07 M08 M09 M10 M11 M12
1000 000 000 000 350 000 000 950 000 000 320
000 000
Since shipping generally takes a month and orders should be placed
three or four months in advance, I was simply going to change the
month names on reports and forms with code. There is no need to go
into it if it is a simple shift of data.
Anyway, how do I get the database to return the above?
Thanks,
Matt
became too complex and Access simply refused to run it. I tried
splitting it into parts but it was still too complex.
Here is the problem. I have a record of data for On Hand (goods in a
warehouse) and Projections (predicted needs) per month. So for one
record (an SKU, five or six keys) I may have these for units (OH = On
Hand):
OH M01 M02 M03 M04 M05 M06 M07 M08 M09 M10 M11 M12
1000 200 100 500 300 100 150 150 200 600 100
100 120
The M01, M02, etc. are fixed fields I created with M01 always the
current month.
What I want to do is to make a query that turns this into what I need
to order for future production. In the above that 1000 On Hand will
last until M04 with 100 short. So I need 100 for M04. But I also
have to order three months of inventory at a time so I want that 100
balance to be added to the next two months needs (100 and 150) to get
350. Than I want to put in what the next production orders should
be. So the above line should turn into this:
OH M01 M02 M03 M04 M05 M06 M07 M08 M09 M10 M11 M12
1000 000 000 000 350 000 000 950 000 000 320
000 000
Since shipping generally takes a month and orders should be placed
three or four months in advance, I was simply going to change the
month names on reports and forms with code. There is no need to go
into it if it is a simple shift of data.
Anyway, how do I get the database to return the above?
Thanks,
Matt