Hi,
I have a table with a field called 'tobuild'
This basically holds a figure based on the result of some other stock
figures in the same table, 'StockQty' & 'MSQ'.
I know you are not supposed to hold a calculated result in a field,
but why ?. It works ok for everything in my system, except for when I
run this query.
MSQ holds the max stock level, StockQty holds the current stock qty and
tobuild holds the value of MSQ minus (-) StockQty.
All tobuild values were initially set as zero.
On a form, tobuild is calculated and set when the StockQty is manually
adjusted.
I also want it to be auto adjusted when orders are placed and stock is
reduced.
I have a query which updates the StockQty fine, and have then tried to
follow on with a query to calculate MSQ-StockQty after the update where
the product name matches
UPDATE stock SET stock.tobuild = "MSQ - StockQty"
WHERE (((stock.StockN ame)=[Forms]![Customer Orders]![OrderLines
Subform].[Form]![SDProdCode]));
The query runs fine, except, for that particular product, tobuild
always ends up as a blank field, and hence causes errors on my asp web
pages. This seems to me the most basic calculation ?
Any clues / answers would be most appreciated.
Thanks.
David
I have a table with a field called 'tobuild'
This basically holds a figure based on the result of some other stock
figures in the same table, 'StockQty' & 'MSQ'.
I know you are not supposed to hold a calculated result in a field,
but why ?. It works ok for everything in my system, except for when I
run this query.
MSQ holds the max stock level, StockQty holds the current stock qty and
tobuild holds the value of MSQ minus (-) StockQty.
All tobuild values were initially set as zero.
On a form, tobuild is calculated and set when the StockQty is manually
adjusted.
I also want it to be auto adjusted when orders are placed and stock is
reduced.
I have a query which updates the StockQty fine, and have then tried to
follow on with a query to calculate MSQ-StockQty after the update where
the product name matches
UPDATE stock SET stock.tobuild = "MSQ - StockQty"
WHERE (((stock.StockN ame)=[Forms]![Customer Orders]![OrderLines
Subform].[Form]![SDProdCode]));
The query runs fine, except, for that particular product, tobuild
always ends up as a blank field, and hence causes errors on my asp web
pages. This seems to me the most basic calculation ?
Any clues / answers would be most appreciated.
Thanks.
David
Comment