angelandgreg
Technical User
I need a little help (maybe a lot J) … I am stuck with this statement.
This is in an update query
Two linked tables by the ProductLine
"MonthNo" field in table MP2_ProjDemandMonths (detail table) has months 1-24 representing a 24
month period January of current year to December of Next Year.
"NoOfMonths" field is in both tables. One in the header table (MP2_ProductLineNoOfMonths) with just field "ProductLine" and the details table (MP_ProjDemandMonths) has ProductLine, Item, etc ...
The Item details will supercede the ProductLine header.
It’ll update for all the items in the Product Line for the number of months except when a specific item has a value other then 0 in the number of months field in the details table, then it’ll use that value to update.
What is it updating? It's the value in the "Qty" field for each consecutive month ("MonthNo") based on the number of months value.
The end result:
Today is the current month 4
The user entered 8 months in the "NoOfMonths" to change / update.
The update query needs to know what the "Qty" is in the "MonthNo" field (4) which is the quantity 100. Other words, month 4 (April) has quantity of 100.
The update query will take the qty of 100 from "MonthNo" 4 and update the next 8 consecutive months. "MonthNo"’s 5-12 and change the qty to 100 regardless of the qty in there now.
Except if the Item (from the details table) also has a "NoOfMonths" value, example the user overrides for the specific item as to update 3 months for the month of July. In this case it’ll take the value in the "Qty" field (say 50) for "MonthNo" 7 and update the next consecutive 3 months to 50 instead of the 100 from the ProductLine (header table) number of months.
This is in an update query
Two linked tables by the ProductLine
"MonthNo" field in table MP2_ProjDemandMonths (detail table) has months 1-24 representing a 24
month period January of current year to December of Next Year.
"NoOfMonths" field is in both tables. One in the header table (MP2_ProductLineNoOfMonths) with just field "ProductLine" and the details table (MP_ProjDemandMonths) has ProductLine, Item, etc ...
The Item details will supercede the ProductLine header.
It’ll update for all the items in the Product Line for the number of months except when a specific item has a value other then 0 in the number of months field in the details table, then it’ll use that value to update.
What is it updating? It's the value in the "Qty" field for each consecutive month ("MonthNo") based on the number of months value.
The end result:
Today is the current month 4
The user entered 8 months in the "NoOfMonths" to change / update.
The update query needs to know what the "Qty" is in the "MonthNo" field (4) which is the quantity 100. Other words, month 4 (April) has quantity of 100.
The update query will take the qty of 100 from "MonthNo" 4 and update the next 8 consecutive months. "MonthNo"’s 5-12 and change the qty to 100 regardless of the qty in there now.
Except if the Item (from the details table) also has a "NoOfMonths" value, example the user overrides for the specific item as to update 3 months for the month of July. In this case it’ll take the value in the "Qty" field (say 50) for "MonthNo" 7 and update the next consecutive 3 months to 50 instead of the 100 from the ProductLine (header table) number of months.