I have 1 table and 1 query. Table shows required materials to fabricate structures. Query shows the material quantity in inventory.
Table:
Structure ID --Required Material Code--Required Quantity ---Status
str1 ------------------Mat1----------------------3
str1 ------------------Mat2 ----------------------2
str1 ------------------Mat3 ----------------------1
str2 ------------------Mat2 ----------------------5
str2 ------------------Mat5 ----------------------1
Query: (is a select query gets the total from another table)
Material Code -------Total Stock
Mat1 -------------------3
Mat2 -------------------2
What I would like to do is update status column to;
Full: if we have all materials in stock(which means required qty< stock qty)
Partial: We don't have complete amount of materials but still can fabricate (stock qty > 0)
None : We have none of the item in stock. (ie mat1 total stock = 0)
I am trying to make an update query where Tables required material code equals to query Material Code and Table required qty > total stock but I am not able to get success.
I tried so many ways to do by query, vba.. but I can't manage. May be you can help me.
Table:
Structure ID --Required Material Code--Required Quantity ---Status
str1 ------------------Mat1----------------------3
str1 ------------------Mat2 ----------------------2
str1 ------------------Mat3 ----------------------1
str2 ------------------Mat2 ----------------------5
str2 ------------------Mat5 ----------------------1
Query: (is a select query gets the total from another table)
Material Code -------Total Stock
Mat1 -------------------3
Mat2 -------------------2
What I would like to do is update status column to;
Full: if we have all materials in stock(which means required qty< stock qty)
Partial: We don't have complete amount of materials but still can fabricate (stock qty > 0)
None : We have none of the item in stock. (ie mat1 total stock = 0)
I am trying to make an update query where Tables required material code equals to query Material Code and Table required qty > total stock but I am not able to get success.
I tried so many ways to do by query, vba.. but I can't manage. May be you can help me.
Last edited: